25. Inserting images

LaTeX provides commands for adding images within text. Parameters allow you to resize the images or scale the images, as well as define placement relative to the margins.

Adding the graphicx package

The graphicx pack­age pro­vid­es a key-value in­ter­face for op­tional ar­gu­ments to the \in­clude­graph­ics com­mand.

Note: Do not use the other graphics package when using graphicx.

Add the graphicx package using the following command:


Insert images using includegraphics

Then insert an image within a text flow using includegraphics.

In the following example, the image is resized:

\includegraphics[width=10.91cm, height=2.33cm]{images/logo.png}

Note: The file extension can be omitted, but I prefer to keep the entire filename, including the extension.

In this example, the image is resized to the following values;

Alternatively, the image can be scaled.


Note: [-1em] is a positioning element, which moves the image 1em to the left of the defined left margin. This is a page design issue.

You can optionally set the path to graphics using the \graphicspath command:

\graphicspath{ {images/} }

Click to continue.