LaTeX Error: Unknown graphics extension: <ext>

\includegraphics was given an image format pdfLaTeX cannot read, such as .tif, .gif, .bmp or .svg. Convert the image to PDF, PNG or JPEG.

Help centre › LaTeX errors › Files and fonts · Error: the build stops or the output is wrong

What the log says

! LaTeX Error: Unknown graphics extension: .tif.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.4 \includegraphics{scan.tif}

What it means

graphicx decides how to read an image from its extension. pdfLaTeX, XeLaTeX and LuaLaTeX read PDF, PNG and JPEG (and EPS after an automatic conversion); the extension in the message is not one of them, so the image is not loaded.

Causes and fixes

Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.

1. The image is in a format LaTeX cannot read

TIFF, GIF, BMP and WebP files must be converted: to PNG for photos and screenshots, or to PDF for plots and diagrams (vector graphics stay sharp). Upload the converted file and change the name in \includegraphics.

Fails
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=0.5\linewidth]{scan.tif}
\end{document}
Fixed
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=0.5\linewidth]{example-image.png}
\end{document}

2. An SVG file

SVG is not read by \includegraphics. Export the figure as PDF from the program that drew it (or convert it); the svg package can include SVG files directly, but only by running an external program during the compile, which many installations and online services do not allow.

3. A file name with extra dots or an unusual extension

A name such as fig.final.v2 without an extension makes LaTeX take .v2 for the extension. Give the real extension (fig.final.v2.png) or rename the file with a single dot.

In Manulyx

The editor shows the error beside the \includegraphics line, with an explanation.

Write in Manulyx for free · Journal templates

More in files and fonts

Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors