Technical Blog‎ > ‎

Latex Error: unknown graphics extension .png

posted Oct 5, 2013, 2:31 AM by Jingshan Du   [ updated Nov 6, 2013, 1:27 AM ]
pdfLaTeX supports using PNG files when using graphicx package. But today I encountered an error that one of my PNG graph "had an unknown graphics extension" compiling with pdfLaTeX.
After searching the internet I found the reason and the solution. Here I paste it as below.

The LaTeX graphics/graphicx package uses the first dot to find the extension. Package grffile changes the algorithm to check for known extensions (option multidot, enabled by default):


That is, one of my PNG files has more than one dots in its file name. After including the package grffile, the compiler ran pretty well. :-)