# How to avoid showing the filename when using graphicx?

I am writing a LaTeX document with the apacite and graphicx package. The issue is when I include an image either using figure with an enclosed \includegraphics or \includegraphics by itself it shows the image with the file name to the side.

For example:

            --------------
|             |
|    BOX 1    |
---------------
Error1.jpg


I do not want it to write Error1.jpg. Would show the image but it seems I do not have enough rep.

This is an example tex file to show the error (with Windows XP, using Miktex 2.8).

\documentclass[man]{apa}
\usepackage{apacite}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}

\includegraphics{Example Error1.jpg}
\begin{figure}[htb]
\includegraphics{Example Error1.jpg}
\caption{This is the caption of the figure.}
\label{fig:fig2}
\end{figure}
\end{document}

-

The grffile is recommended. Another solution for spaces is enclosing the file name between ": \includegraphics{"Example Error1"}, but this may break if babel is used. –  egreg May 15 '12 at 23:10
Simply \usepackage{grffile} is sufficient to fix this. Thanks! –  Ben Voigt Jan 2 '13 at 15:35
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.