Take the 2-minute tour ×
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.

Is it possible to prevent the contents of a figure from being rendered? I have a large book document, and to speed up compiling while working on a draft, I would like to have some way of ignoring the content of the images, but ensuring that the figure size remains.

In several cases I am using a line like:


so I do not know the actual size of the image.

share|improve this question
\usepackage[draft]{graphicx} is the usual answer. It may require something else if you load other packages. –  egreg Apr 14 '12 at 13:56
Related: How to replace all pictures by white rectangles? –  Werner Apr 14 '12 at 15:55

1 Answer 1

up vote 19 down vote accepted

You can either give the draft flag to the documentclass which has other implications as it gives the draft option to packages called (although some of them may ignore it).

Alternatively, calling the graphicx package with the draft option should just do what you want.




If however, while in draft mode you want to see one of the graphics without adding them all in the output, you can unset the draft mode on a per file basis by setting draft to false as follows:

share|improve this answer
perfect. Thanks, I did not realize that \usepackage[draft]{graphicx} handled the image size. –  celenius Apr 14 '12 at 14:01
@celenius: It still reads the correct image size from the image files and generates a dummy placeholder with the same size. There is also the demo option which will not look for any images files and insert some fixed-size replacement. –  Martin Scharrer Apr 14 '12 at 14:04
For more on the demo option, please see tex.stackexchange.com/questions/21924/… –  johntex Aug 14 '14 at 2:22

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.