Skip to Main Content

LaTeX for Publications: Images

Inserting an Image

Inserting images "by hand" requires a little work, but it isn't terribly complex or difficult to understand. The feature is fairly powerful, giving you great control over how the image is presented in the document.

Required Package
Packages in LaTeX are macros, which are loaded in the preamble. The graphicx package is all that's needed to enable insertion of images in your document.

Enabling the graphicx package in a LaTeX document (with an optional comment, for clarity):
 
\usepackage{graphicx} % Required for inserting images

Now let's see how to insert an image in a LaTeX document. The image should be in the same folder as the document where it is being inserted.
 
\begin{figure}
 \centering  % Indenting is for clarity
 \includegraphics[width=3.6in]{raven.jpg} % Filename is raven.jpg
 \label{fig:nevermore} % Each image needs a unique label
\end{figure}


A complete description of the (not very difficult) process of placing images in a LaTeX documents can be found in the LaTeX/Floats, Figures and Captions chapter of the LaTeX wikibook.

Images in Overleaf

Staff LADR