TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a command that I can use as a placeholder for \includegraphics? I want to use such a placeholder to add the original graphics later.

share|improve this question
You may create a dummy.jpg (or dummy.eps) and use this dummy graphic until you have your original one. – knut Feb 11 '12 at 14:35
See tex.stackexchange.com/a/30624/4427 for having the demo option not printing big blobs. – egreg Feb 11 '12 at 15:15
@egreg: can you post that one as an answer to this one? I may accept that one. – nimcap Feb 11 '12 at 15:38

todonotes provides the \missingfigure command, precisely designed for this case



\missingfigure[figwidth=6cm]{Testing a long text string}


Result of the above code

share|improve this answer
up vote 27 down vote accepted

If you need individual figures to be omitted rather than all of them, you first copy a dummy figure (called foo here) to your figures path, then use as:


It will display something like:

enter image description here

It will also save ink, and you can use \includegraphics syntax as it is, you just need to replace foo and remove draft from command.

share|improve this answer
I am not sure if the bounding-box computations are reliable. I had some problems with the replacement of default sized boxes for the draft mode graphics. By the way, for every picture you can also use \usepackage[draft]{graphicx}. Turkce gormek ayrica sasirtici :) – percusse Feb 13 '12 at 13:56
@percusse: actually, although I almost never use default sizes, I omitted width, height arguments in my example. selamlar efendim :) – nimcap Feb 13 '12 at 19:28

I dont't like the demo option of the graphicx package, because one get some ugly black boxes in the document. And if you want to make a test print you waste a lot of ink and maybe your reviser is wondering about. So I created my own demo mode and just include an empty rectangle with the same size of the original picture. If I want to use the original pictures I comment the definition out and all the pictures will be inserted. For this it is necessary to use the picins package.

enter image description here



  \caption{My Picture}
share|improve this answer
Where did you get picins? It doesn't seem to be a standard package. – qubyte Feb 11 '12 at 14:20
@MarkS.Everitt Used to be standard but was removed from TL, I think, for license reasons. – Joseph Wright Feb 11 '12 at 14:24
At ctan.org/pkg/picins you can see that picins is standard in MiKTeX (I use MiKTeX) but not in TeXLive. You should install it manually. – Holle Feb 11 '12 at 14:25
@Holle: Good to know. Could you put the link into the answer though? I think it's a good thing to have there for completeness. – qubyte Feb 11 '12 at 14:50
@Yiannis Please keep in mind that this approach was intended by the fact that there were no pictures to insert and that we don't want to use the demo mode of the graphicx package. So you don't know the size of the pictures. If you already have the pictures and you don't want to show them in the document you should use the draft option of you documentclass. – Holle Feb 11 '12 at 18:12

Either load the graphicx package with the demo option or replace \includegraphics by, say, \rule{2cm}{2cm}.

share|improve this answer
IIRC, \includegraphics[demo,width=<..>,height=<..>]{dummy} should work as well, i.e. demo used locally. – Martin Scharrer Feb 11 '12 at 13:39
@Martin: I get ! Package keyval Error: demo undefined. – math Nov 5 '12 at 14:18
To avoid the black box of \rule{2cm}{2cm} but to keep the simplicity, you can draw just two or three edges of the box with \rule{.1pt}{2cm} \rule{2cm}{.1pt} \rule{.1pt}{2cm} – Andrew Martin Dec 15 '14 at 14:12

You can do without additional packages: just load graphicx with the demo option and do as explained in this answer; I repeat the code for completeness:



Just remove the demo option and comment the additional code when you want to include the real graphic files.

This will produce framed rectangles with the specified width and height, but using a predefined dimension when width= and height= are not specified in the options to \includegraphics.

Another strategy is to load graphicx with the draft option, that will read the graphic files for getting their dimensions and print a framed rectangle with the file name in their place


As always, beware of file names with spaces: enclosing the name between double quotes should avoid problems.

share|improve this answer

Inspired by Holle's answer (avoid a big black toner hungry box), here is one with pgf. The pgf package has a draft option. With it:





where scratch.png is your image. With draft as an option to the pgf package this simply looks like a box with the file name:

enter image description here

Without the draft option, the image is placed as expected.

share|improve this answer
Doesn't this just draws a box of X by Y? One would ideally need to be able to measure the actual image and print the box to the resulting dimension (i.e, if only width or height is specified, keepaspectratio etc). – Yiannis Lazarides Feb 11 '12 at 16:28
I agree. It defaults to a 1cm by 1cm box. Perhaps it can be improved, but it's already a peripheral answer. – qubyte Feb 11 '12 at 16:37

If you want to "hide" the entire picture, but reserve the space, you could use the following lines:

\includegraphics[draft , ...]{picture}
share|improve this answer
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it) or type Ctrl+K. – henrique May 9 '12 at 15:38

A better version to hide the entire picture but keep the space is to use the phantom command


This avoids white text, could for example be selected in the pdf.

PS: not enough repo to comment on Dennis' answer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.