I am trying to insert an image with the graphicx package using LuaLaTeX. I receive an error that the file cannot be found. I get this whether I use the \graphicspath argument or include the complete path in \includegraphics. After reading all similar discussions I could find, I have arrived at this code:

    \setmainfont{Century Gothic}

    \includegraphics{ACTB Normalized.png}

The error I receive is:

LaTeX Warning: File `ACTB Normalized.png' not found on input line 10.

! Package luatex.def Error: File `ACTB Normalized.png' not found: using draft setting.

See the luatex.def package documentation for explanation. Type H for immediate help. ...

l.10 \includegraphics{ACTB Normalized.png}

I have also tried other image file formats including .jpg, .pdf, and .eps. Any insights on this issue would be greatly appreciated. Thank you!

  • 5
    Did you saved the file in folder named "Figures" ? Also try to avoid spaces in name of files... It is bad practice. – koleygr Jun 19 '17 at 16:52
  • 1
    Welcome to TeX.SX! Try adding \usepackage{grffile} – egreg Jun 19 '17 at 17:03

Turned out to be a very simple solution. Apparently it didn't like the space in the filename of my graphic. Removing spaces or using grffile package solves the problem. Thank you for your comments!


Do not use accented characters or space in the file path

  • 1
    Welcome to TeX.SX! This is more a comment rather than an answer. Could you please elaborate on why using accented characters in file paths is bad given the example of the OP? – TeXnician May 19 '18 at 7:13

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.