TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

I have inserted an image in my LaTeX document and the image always displays with the file path of the image directly above it. How can I prevent this file path from displaying?

I am inserting the image like this:

\caption{a caption}

Here is a working example of document that produces this behaviour:


\includegraphics{C:/Users/Name/Pictures/image 1.png}



The image was inserted using the TeXnicCenter Insert>Picture function.

When I generate the pdf document, directly above any image (I have inserted multiple images using this technique) the file path displays above the image, in the case above it would show: "file\path\of\image", how can I prevent this from displaying?

share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. You're probably loading some package or using some option that causes this behaviour. – Jake Sep 25 '11 at 7:46
This is caused by the draft option, either for the graphicx package or the class. – Joseph Wright Sep 25 '11 at 7:50
Is file\path\of\image meant to be a normal path or really three macros? You need to use / not `` even under MS Windows, AFAIK. – Martin Scharrer Sep 25 '11 at 7:54
@Martin: Sorry it is just meant to be an imaginary file path. I will update the question to better reflect this. – Aesir Sep 25 '11 at 7:58
Can you post the log you get for your example: it is fine for me. By the way, it's not a good idea to provide the pdftex option for the graphicx package. Unless you are using dvipdfmx, graphicx will pick up automatically on the correct driver. – Joseph Wright Sep 25 '11 at 8:00
up vote 7 down vote accepted

Avoid special characters (blank spaces, underscores, …) in the name and the path of the file. For extended file name processing try the grffile package from the oberdiek bundle.

share|improve this answer
Thanks for all the help everybody. Loading the package grffile has sorted the problem! – Aesir Sep 25 '11 at 11:56

Normally you shouldn't use white spaces or special characters in path. To use them you can load the package grffile

Alternatively you can use:

share|improve this answer
@diabonas: Thanks. – Marco Daniel Sep 25 '11 at 11:33

Another common reason for the same problem is one may use "draft" mode.

For example,


Simply removing the draft option will solve the problem.

share|improve this answer
(+1) Joined to upvote. I had added draft into the options without even knowing what it will do. – FrenzY DT. Jul 2 at 10:59

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.