Overleaf uses pdflatex but I still get this error when I try to insert a .png image. \includegraphics{screenshots/AB4results.png}

In fact, Overleaf has a .png file in its template:

\graphicspath{ {./images/} }

The universe is immense and it seems to be homogeneous, 
in a large scale, everywhere we look at.


There's a picture of a galaxy above

enter image description here

Here are all the packages I'm using.

\usepackage[english, greek]{babel}
\usepackage[T1, T2A]{fontenc}
\usepackage{color} %red, green, blue, yellow, cyan, magenta, black, white
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue

\usepackage{bigfoot} % to allow verbatim in footnote





%inserting png images


Edit: I included the size in the code and the error disappeared: \includegraphics[width=0.8\textwidth,natwidth=489,natheight=436]{screenshots/AB4results.png}

However, the image still does not appear.

  • 6
    [Disclaimer: I'm a support personnel at Overleaf.] Could you click on the Overleaf menu icon above the file tree panel, and check that the project's Compiler option is indeed set to "pdflatex", not "LaTeX"?
    – imnothere
    Apr 29, 2020 at 9:05
  • 2
    And if you are indeed using pdflatex, then you should remove natwidth=489,natheight=436.
    – imnothere
    Apr 29, 2020 at 9:06
  • @LianTzeLim Many thanks. Apr 29, 2020 at 9:09


You must log in to answer this question.

Browse other questions tagged .