How to avoid showing the filename when using graphicx?

Old post, but you can do the following.

\includegraphics{"Example Error1".jpg}

You should also avoid other special characters like underscores in the complete path and the name of the file. But you can use the grffile package for extended file processing. For this case, just add the following line:

\usepackage{grffile}

I found the answer while writing this since I wrote ExampleError1.jpg when doing the example image. The problem is that graphicx doesn't seem to like the spaces in the file name and it assumes it should write it. I tried writing Example\ Error1.jpg but it didn't like it either. The solution I propose is that write these filenames without spaces.

Tags:

Graphics