How-to

LaTeX Image Not Showing or Not Found

The fix

If \includegraphics shows nothing or errors with "file not found", check three things: load \usepackage{graphicx}; use a supported format (PDF, PNG, or JPG for pdfLaTeX — not EPS directly); and give the correct name without the extension, with the file uploaded to your project. Add \graphicspath{{figures/}} if images live in a subfolder.

Why it happens

pdfLaTeX only embeds PDF, PNG, and JPG. An EPS file, a wrong filename, a missing graphicx package, or a file that is not in the compile directory all make the image fail — sometimes silently, sometimes as "File not found" or "Cannot determine size of graphic".

Example

\usepackage{graphicx}
\graphicspath{{figures/}}   % optional subfolder

\begin{figure}[H]
  \centering
  \includegraphics[width=.6\textwidth]{plot}  % no .png needed
  \caption{...}
\end{figure}

% EPS image? Convert it to PDF, or add \usepackage{epstopdf},
% or compile with XeLaTeX / LuaLaTeX.

Frequently asked questions

It says "Cannot determine size of graphic".

Usually a wrong format (e.g. EPS with pdfLaTeX) or a corrupt file. Convert the image to PDF/PNG/JPG, or add \usepackage{epstopdf} if you must keep EPS.

Do I include the file extension?

Best not to: write \includegraphics{plot} and LaTeX picks the right file. If you have both plot.png and plot.pdf, then add the extension to disambiguate.

The image is in a subfolder.

Set \graphicspath{{figures/}} (note the double braces and trailing slash), or reference it inline: \includegraphics{figures/plot}.

Try the fix in LetX

Open the editor, paste your code, and compile in 1 second to see the error clear — free, in your browser.

Open LetX Free