If an included graphics file is not present, the compilation does not abort with an error. An empty figure is rendered, cached and included, resulting in a successful compilation of the document. The result depends on whether files are included with or without suffix. With suffix, a box containing the file name is rendered. Without suffix the complete figure environment including caption just disappears.
To make the error even harder to detect, the labels are defined and can be referenced without warning.
\documentclass{article}
\usepackage{graphicx}
\usepackage{graphicscache}
\begin{document}
\begin{figure}
\includegraphics[width=\linewidth]{nonexistent-file.jpg}
\caption{Test caption}
\label{fig1}
\end{figure}
\begin{figure}
\includegraphics[width=\linewidth]{nonexistent-file-without-suffix}
\caption{Test caption for file without suffix}
\label{fig2}
\end{figure}
Figure \ref{fig1} and Figure \ref{fig2}
\end{document}
If an included graphics file is not present, the compilation does not abort with an error. An empty figure is rendered, cached and included, resulting in a successful compilation of the document. The result depends on whether files are included with or without suffix. With suffix, a box containing the file name is rendered. Without suffix the complete figure environment including caption just disappears.
To make the error even harder to detect, the labels are defined and can be referenced without warning.
Resulting PDF