I am using MikTex 2.9 and TeXstudio for my TeX preparation. I would like to set the path to my figures folder, which contains all the figures, plots etc. required for my work.

I used \graphicspath to set the directory, but it gives me an error message:






Error: Package pdftex.def Error: File `logo.jpg' not found

However, when I prepend the filenames of the images with the same path in the \includegraphics command, it works just fine:






Why is \graphicspath not setting the path?

  • 9
    What happen if you add / after figures in graphicspath?
    – Ludovic C.
    Commented Oct 18, 2013 at 8:02
  • @Marienplatz It's a windows machine and paths are system dependent. If somebody else needs a windows solution miktex is a viable option.
    – percusse
    Commented Oct 18, 2013 at 8:58
  • 3
    @percusse But \graphicspath works the same irrespective of platform
    – Joseph Wright
    Commented Oct 18, 2013 at 10:16
  • @JosephWright Also true. But that's not people search unfortunately, including me. Added TeXLive too so hopefully both can end up here.
    – percusse
    Commented Oct 18, 2013 at 18:02
  • 3
    I think it's important to understand that this feature is not that sophisticated and it is on the programmer's reconnaissance to use it sensibly. If in the OP example, the path, as typed, was correctly inside its own set of brackets, which is essential, the code would work if the file name was typed in as \logo.jpg. The file name is simply being appended to the path, so if both are weird, but together make a sensible path name, it will work. If the graphics path was terminated by / you could also access subfolders in your graphics stash with Subfolder/logo.jpg. Commented Mar 13, 2016 at 23:47

2 Answers 2


Try it!

More general case:


The ... is not the part of the syntax for sure! It is there just to represent something like 1,2,3,...,n in a set theory.

If the figures are saved in a sibling directory, use ../ to access the parent directory.

  • 58
    I often find this useful: \graphicspath{{./figs/}} This will include a subdirectory named figs which is in the same directory as your current .tex file
    – kevin
    Commented Dec 18, 2014 at 0:47
  • 11
    I have found that the pathnames enclosed in braces must not have any spaces in them.
    – Digger
    Commented Dec 30, 2015 at 21:32
  • Just visiting but to put upvoting :))
    – Mikasa
    Commented Jan 29, 2023 at 10:22

Every specific path shoud be ended by /, and contained by a pair of braces. Try:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .