# How to preserve a space for a figure to be added later?

I want to add an empty figure in a document with added captions .. etc, so that I can add the figures later. Is there a direct way to do this? For example insert a white box with a big X across it or something?

• Based on Example images in LaTeX?.
• The MWE package provides example pictures.
• Another possibility is the demo option of the graphicx package which includes a black square.
• I prefer ways that use the 'normal' \includegraphics command since it means less change when you include the actual content later. On the other hand, the \missingfigure command in the other answer shows very clear that something has to be done (which is good depending on the use case).

\documentclass{article}
\usepackage{graphicx}
\usepackage{float}

\begin{document}

Text before.

\begin{figure}[H]
\centering
\includegraphics[width=50mm,height=20mm]{example-image-a}
\caption{Caption}
\end{figure}

Text after.

\end{document}


\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{float}

\begin{document}

Text before.

\begin{figure}[H]
\centering
\includegraphics[width=150mm,height=20mm]{}
\caption{Caption}
\end{figure}

Text after.

\end{document}


• Don't use [H], please! – egreg Jun 4 '17 at 16:41
• @egreg Haha -- I will not argue with you! – Dr. Manuel Kuehner Jun 4 '17 at 16:44

A couple of other ways.

\documentclass{article}
\usepackage{graphicx}
\usepackage{todonotes}
\begin{document}

\begin{figure}
\centering
% \missingfigure is from todonotes
\missingfigure[figwidth=\linewidth,figcolor=white]{Some text if needed}
\caption{Bla}
\end{figure}

\begin{figure}
\centering
\framebox[7cm]{\scalebox{15}{X}}
\caption{Bla}
\end{figure}
\end{document}