# Selectively replace images by “draft”-like frameboxes

I have a long pdflatex file containing many images, some of which are quite large. Has anyone written code about selectively replacing images by the framebox produced by the `draft` option of the graphics package?

In other words, what I need is a variant of the `\includegraphics` command which will get the bbox of the file asked to be loaded and create a framebox of exactly the same size containing the name of the file. And by this it will significantly accelerate the LaTeX run. I need this both for PDF and for PNG/JPG files. (In tikz-pgf this should be trivial for those who know how to do it…)

• – egreg Apr 11 '15 at 18:07

Just change this:

`\includegraphics{yourfigurefilename}`

with this:

`\includegraphics[draft = True]{yourfigurefilename}.`

• Just the `draft` option is sufficient; you don't need `draft = True`. – erik Apr 11 '15 at 15:53
• Welcome to TeX.SX! As regards erik's comment, `draft=true` is not wrong, `draft` is a boolean option, but of course plain `draft` is shorter. – Andrew Swann Apr 11 '15 at 15:59
• This is rather a comment than an answer – user31729 Apr 11 '15 at 16:06
• @HenriMenke and ChristianHupfer -- What's the problem? This answer works. In fact, given the lack of detail in the question, providing a more complete answer at this point seems improvident.... (Not that better answers couldn't be given!) – jon Apr 11 '15 at 16:17
• @HenriMenke This is the correct answer. – egreg Apr 11 '15 at 17:57