## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ inserted image is somehow invisible Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am

### inserted image is somehow invisible

I inserted an image using the following code, but the image doesn't show up.
%somehow the image doesn't show up!\begin{figure}[h!]\begin{center}\includegraphics[width=7cm,natwidth=610,natheight=642]{flowchart.pdf}\caption{G2P Flowchart} \label{flowchart}\end{center}\end{figure}

Attachments
it looks like it's there, but can't see it.
invisible image.JPG (11.82 KiB) Viewed 2816 times

Tags:

Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm

\documentclass{article}\usepackage{graphicx}\begin{document}\begin{figure}%[h!]% Don't make your text ugly please.	\centering% JB: Never use the center environment in a figure		\includegraphics[width=7cm]{example-image.pdf}		\caption{G2P Flowchart}		\label{flowchart}\end{figure}\end{document}

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am
It is my very first time to use MikTeX, and it is all by myself, so please bear with me.

Still got errors, please see the log file attached.

P.S. I am using a template created by others, and this error occurs.
Attachments
invisible image error log.txt
the correct log file

Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm
Sems like something in your document just allows eps files. Please check with the editors of the journal.
Are you allowed to distribute the template? If so, please and i can tell you which is the compromising part. But this won't help if the journal just allows eps images to be included.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am
I have tried with all image formats (jpg, png, pdf, and even eps), but still the image never shows up. Only the caption appears.

Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm
Please post a minimal working example.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

mkrlatex
Posts: 4
Joined: Wed Oct 12, 2016 9:34 am
Thanks a lot, Johannes_B.

Fixed.

The problem was with the userpackage (\usepackage[dvipdfm]{color,graphicx} % for dvipdfm(x)). By removing [dvipdfm] and change the includegraphics line to \includegraphics[width=7cm]{flowchartthen.pdf}, the image shows up nicely.

Thanks a lot for your help,
Makara

Stefan Kottwitz
Posts: 9563
Joined: Mon Mar 10, 2008 9:44 pm
Hi Makara,

welcome to the forum!

Indeed, it's very recommendable to not give a driver option, so the graphicx package chooses the correct driver option by itself automatically.

Stefan