graphicx and use \includegraphics{...}. Then set width, height, scaling, trimming, captions, labels, and placement with the figure environment.
Quick answer: add
\usepackage{graphicx} to the preamble, then write \includegraphics[width=0.8\textwidth]{image-file}. Use trim=... , clip to crop whitespace and figure when you need captions and labels.Related topics: Figure positioning | Tabular environment | Package managementCommon image tasks
| If you need… | Use |
|---|---|
| Insert one image | \includegraphics{image} |
| Set width relative to the page | \includegraphics[width=0.7\textwidth]{image} |
| Keep the aspect ratio | \includegraphics[width=5cm,keepaspectratio]{image} |
| Crop whitespace | \includegraphics[trim=1cm 0.5cm 1cm 0.5cm,clip]{image} |
| Add caption and label | wrap the image in \begin{figure}...\end{figure} |
| Put two images side by side | use two \includegraphics commands with widths like 0.45\textwidth |
Quick Start
quick-image.tex
Basic Image Insertion
Simple Image Include
Supported Image Formats
| Compiler | Formats Supported |
|---|---|
| pdfLaTeX | PDF, PNG, JPG/JPEG |
| XeLaTeX | PDF, PNG, JPG/JPEG, EPS* |
| LuaLaTeX | PDF, PNG, JPG/JPEG, EPS* |
| LaTeX (DVI) | EPS, PS |
Scaling Images
Width and Height Control
Common Width References
Figure Environment
Basic Figure
Figure Placement Options
| Option | Meaning | Priority |
|---|---|---|
h | Here (approximately) | Low |
t | Top of page | Medium |
b | Bottom of page | Medium |
p | Page of floats | Low |
H | HERE (exactly)* | Forced |
! | Override LaTeX’s rules | Modifier |
\usepackage{float}
Multiple Images
Side by Side Images
Grid of Images
Image Transformations
Rotation and Flipping
Clipping and Trimming
Advanced Techniques
Wrapping Text Around Images
Image Paths
Draft Mode
Image Formats and Conversion
Working with Different Formats
Best Practices
Troubleshooting
Quick Reference
Essential Commands
| Command | Purpose | Example |
|---|---|---|
\includegraphics{} | Insert image | \includegraphics{pic} |
width= | Set width | width=5cm |
height= | Set height | height=3cm |
scale= | Scale factor | scale=0.5 |
angle= | Rotate | angle=90 |
\caption{} | Add caption | \caption{Description} |
\label{} | Add reference | \label{fig:name} |
Figure Template
Next: Master Figure positioning to control exactly where your images appear, or learn about Creating tables for structured data presentation.
