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?

  • 2
    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, 2011 at 7:46
  • 2
    This is caused by the draft option, either for the graphicx package or the class.
    – Joseph Wright
    Sep 25, 2011 at 7:50
  • 2
    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. Sep 25, 2011 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, 2011 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, 2011 at 8:00

3 Answers 3


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.

  • 1
    Thanks for all the help everybody. Loading the package grffile has sorted the problem!
    – Aesir
    Sep 25, 2011 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:


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

For example,


Simply removing the draft option will solve the problem.

  • 2
    (+1) Joined to upvote. I had added draft into the options without even knowing what it will do.
    – Frenzy Li
    Jul 2, 2016 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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