# Image on beamer does not show

I am trying to include an image in my beamer presentation, but no picture is coming up. My code is:

\documentclass{beamer}
\mode<presentation>
\usetheme{Warsaw}
\usepackage{graphicx}

\begin{document}

\begin{frame}\frametitle{Genetic data from a single tumour}
\includegraphics[width=5cm]{Screenshot}
\end{frame}

\end{document}


In the same file as the Latex document I have a jpeg file Screenshot.jpg saved.

I have no idea why the picture does not appear in the presentation. Any help really appreciated!

• Hi, welcome. How exactly do generate the PDF? Can you add the contents of the .log file to your question? – Torbjørn T. Apr 2 '18 at 9:35
• off-topics: the package graphicx is loaded by beamer, it is not needed to load it again. – Zarko Apr 2 '18 at 9:56
• Which engine do you use to compile? pdflaetx or latex? – samcarter_is_at_topanswers.xyz Apr 2 '18 at 10:11
• For content that contains text it might be better to make the screenshot in .png format. – samcarter_is_at_topanswers.xyz Apr 2 '18 at 10:12
• Torbjørn T. - I'm not sure where to find the .log file. Where is this supposed to be? – user301395 Apr 2 '18 at 12:53

First, run the following code and make sure the output is as the image below. You don't need to say \usepackage{graphicx}, beamer loads it by default. Then check your image in any image editing software. Also, make sure there is no spaces in the full path of the image file.

If the image is still unreadable by latex, convert the image to another format .png, .jpeg, etc. or .pdf.

\documentclass{beamer}
\usepackage{lmodern}
\mode<presentation>
\usetheme{Warsaw}

\begin{document}

\begin{frame}\frametitle{Genetic data from a single tumour}
\includegraphics[width=5cm]{example-image}
\end{frame}

\end{document}


• Thanks for your response. And yes, your code runs perfectly. I tried png format as you suggested, which doesn't work. So perhaps as you suggest, there may be spaces in the full path of the image file. I'm not quite sure what this means. What is the path of the image file, and how can you check it? Apologies if this is a stupid question. – user301395 Apr 2 '18 at 12:39
• @user301395 - For some reason, LaTeX sometimes doesn't understand .jpg images. In your case, just edit the image with Paint and Save as -> PNG Picture in the same folder, now it will appear in your slides. By spaces in path I meant that the image may be in a folder like this: D:\My Thesis\TeX Files\, these spaces between words in the path to the image causes problems. – AboAmmar Apr 2 '18 at 14:45
• Amazing - removing spaces makes it work. Thank you so much. – user301395 Apr 3 '18 at 13:10