# Overleaf - includegraphics is not working: empty images

I was getting a "no BoundingBox" error in my file and I saw that to solve my problem I should convert .png files to .eps. Done. Now, the errors disappeared but the figures are not visible. Here is the code:

\begin{figure}[ht!]
\centering
\includegraphics[width=0.7\textwidth]{RedeUsina.eps}
\caption{Some caption here}
\label{fig:arq}
\end{figure}

\begin{figure}[ht!]
\centering
\includegraphics[width=0.7\textwidth,]{AmbienteTestes.eps}
\caption{Some caption here.}
\label{fig:amb}
\end{figure}


The spaces of the images are generated, but just the empty spaces, nothing visible (no images).

I would like to know how to solve this. I am using a variant of the IEEE tran, named sbrt2018port.cls.

• I guess overleaf would use pdflatex by default, in which case eps files would not be allowed and converted to png in the background anyway. What you have done confuses me. May 9, 2018 at 5:57
• (I'm a support personnel at Overleaf) .eps files are allowed with pdflatex + Overleaf; --shell-escape is enabled by default and would convert it to .pdf. (Re security concerns: Each Overleaf project is in its own Docker container so the -shell-escape would only affect your own project.) However the original "No bounding box" messages may mean your original .png files are missing metadata re its dimension. If you email support@overleaf.com and let us know your project URL, we can have a closer look for you. May 9, 2018 at 6:03
• If you got a no bounding box error with png-files then you perhaps used latex instead of pdflatex. May 9, 2018 at 7:01
• @Johannes_B , I was using .png files, but I was receiving the "no BoundingBox" error. When I searched about, I saw people talking about the .eps files and tried. May 9, 2018 at 15:22
• I've now had a look at sbrt2018port.cls; it contains \usepackage[dvips]{graphicx}. Removing the dvips solves the problem: graphicx is smart enough to know what driver to use anyway. May 9, 2018 at 16:45

sbrt2018port.cls (a copy can be found here) has a line \usepackage[dvips]{graphicx}, so .png files cannot be processed correctly even if you use pdflatex to compile your project.
Removing the dvips on that line, so that graphicx can use the suitable driver to process image files, solves the problem. graphicx is smart enough to know which driver to use anyway, based on the engine used to compile your document.