Unknown Graphics Extension
! LaTeX Error: Unknown graphics extension: .XXX.
What this error means
You tried to include an image with a file format that the current LaTeX engine doesn't support. Different engines support different image formats.
FormaTeX smart compile
FormaTeX smart compile detects EPS images and automatically switches to an engine with epstopdf support, or converts the image format before compiling.
Common causes
- Using .eps images with pdflatex (which doesn't support EPS natively)
- Using a format like .bmp, .tiff, or .psd that no engine supports
- Typo in the file extension
How to fix it
For pdflatex: use .pdf, .png, or .jpg images. For XeLaTeX/LuaLaTeX: same plus .eps via epstopdf. Convert unsupported formats beforehand. You can also omit the extension and let LaTeX pick the best format automatically.
Code examples
\documentclass{article}
\usepackage{graphicx}
\begin{document}
% pdflatex doesn't support .eps
\includegraphics{figure.eps}
\end{document}\documentclass{article}
\usepackage{graphicx}
\begin{document}
% Use PDF, PNG, or JPG with pdflatex
\includegraphics{figure.pdf}
% Or let LaTeX choose:
% \includegraphics{figure}
\end{document}Related errors
File Not Found
! LaTeX Error: File 'XXX' not found.
Unicode Character Not Supported (pdfLaTeX)
! Package inputenc Error: Unicode char U+XXXX not set up for use with LaTeX.
Cannot Determine Size of Graphic (No BoundingBox)
! LaTeX Error: Cannot determine size of graphic (no BoundingBox).
Citation Undefined
LaTeX Warning: Citation 'XXX' on page N undefined.
Test the fix live
Paste your LaTeX into the playground and compile instantly.

