If you only include stand-alone images, then you can easily "turn of" the \includegraphics
command by loading the document class (or graphicx
) with the draft
option:

\documentclass[draft]{article}
\usepackage{graphicx}
\begin{document}
Image A: \includegraphics[height=2\baselineskip]{example-image-a}
Image B: \includegraphics[height=2\baselineskip]{example-image-b}
Image C: \includegraphics[height=2\baselineskip]{example-image-c}
\end{document}
A similar approach would be to redefine \includegraphics
to do whatever you want:

\documentclass{article}
\usepackage{graphicx}
\renewcommand{\includegraphics}[2][]{\rule{50pt}{20pt}}
\begin{document}
Image A: \includegraphics[height=2\baselineskip]{example-image-a}
Image B: \includegraphics[height=2\baselineskip]{example-image-b}
Image C: \includegraphics[height=2\baselineskip]{example-image-c}
\end{document}
However, if you create your graphics on-the-fly (using something like a tikzpicture
or pspicture
), then you need to be more creative. One way to achieve this would be to capture the entire environment and gobble its contents:

\documentclass{article}
\usepackage{tikz,environ}
\RenewEnviron{tikzpicture}[1][]{}
\begin{document}
Image A: \begin{tikzpicture}[options-a] A beautiful image \end{tikzpicture}
Image B: \begin{tikzpicture}[options-b] A beautiful image \end{tikzpicture}
Image C: \begin{tikzpicture}[options-c] A beautiful image \end{tikzpicture}
\end{document}
The same could be done using the figure
(float) environment, but then you'd lose all references to \caption
(however, you could consider it).
The environment-gobble mechanism could be made more advanced by actually writing the picture environment inside \phantom
, thereby creating the required size/shape of the output. However, this would incur the same amount of compilation overhead/time.
\renewenvironment{figure}{}{}
. Alternatively you should consider using thedraft
option for thegraphicx
package:\usepackage[draft]{graphicx}
.\begin{center}
within afigure
unless you specifically want additional vertical space. Try\centering
instead.