When using graphicx's \includegraphics you can specify the file extension or not. For generic use and perhaps portability, extensions are commonly dropped. The types of "approved" inclusions and their order of precedence depends on the driver/compiler being used. What are these driver-defaults?

Related: Which graphics formats can be included in documents processed by latex or pdflatex?

4 Answers 4



Version 2011/05/28 v0.06e

The list depends on

  • the version of pdftex.def,
  • the version of pdfTeX (temporarily TIFF was available, latest addition is JBIG2),
  • the version of the generated PDF (JBIG2 requires PDF 1.4).

For the current versions (2012) and PDF ≥ 1.4, the list is:


The order of the list is not optimal, it is a victim of compatibility.

The list can be extended by package epstopdf that adds .eps to the list and provide means to support further image formats.


Version: 1999/02/16 v3.01i


Other supported extensions:



Version: 1999/9/6 vx.x (Bug: should be 1999/09/06)


Also supported are EPS files.


Version: 1999/02/16 v3.0i



Version: 2009/11/22 v0.94



Version 2001/10/02 v7.45

(also .tiff, .targa, .jpeg)

Other drivers in the graphics bundle

Version: 1999/02/16 v3.0i

dvipdf.def:  .eps,.ps,.eps.gz,.ps.gz,.eps.Z
dvipson.def: .eps,.ps,.pcx,.bmp (also .tif)
dviwin.def:  .eps,.ps,.wmf,.tif
emtex.def:   .eps,.ps,.pcx,.bmp
pctex32.def: .eps,.ps,.wmf,.bmp
pctexhp.def: .pcl
pctexps.def: .eps.ps
pctexwin.def: .eps,.ps,.wmf,.bmp
tcidvi.def:   <empty> (also .ps,.eps,.PS,.EPS and BMP)
truetex.def:  .eps,.ps (also .tif,.bmp)

List manipulation

I recommend package grfext for manipulating the list of graphics extensions.

  • Extensions can be added: \AppendGraphicsExtensions, \PrependGraphicsExtensions.
  • Extensions can be removed: \RemoveGraphicsExtensions.

For example, prefer vector graphics over bitmap graphics, indenpendent of the driver:


  \PrintGraphicsExtensions % see .log file


Package grfext prints the list in the .log file (example for pdflatex/TL2011):

Package grfext Info: Graphics extension search list:
(grfext)             [.mps,.pdf,.PDF,.eps,.png,.PNG,.jpg,.jpeg,.JPG,.JPEG,.jbig2,.jb2,.JBIG2,.JB2]

The star form of \PrependGraphicsExtensions only adds the extensions that are supported by the graphics driver.


The defaults are defined in the driver files, not by graphicx itself. A simple way to see them is to use texdef, e.g. texdef -t pdflatex -p graphicx Gin@extensions.

For latex in DVI mode the default extension list is .eps,.ps,.eps.gz,.ps.gz,.eps.Z, for pdflatex and lualatex it is .png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPEG,.JBIG2,.JB2,.eps and for xelatex it is .pdf,.eps,.ps,.png,.jpg,.bmp,.pict,.tif,.psd,.mac,.sga,.tga,.gif.

  • 6
    I have always wondered why .png has precedence over .pdf in pdflatex. I mean, if you have a vector and a bitmap version of the same image, the bitmap version should be preferred? Does anybody have a clue about the rationale behind this?
    – Daniel
    Commented Sep 17, 2012 at 19:02
  • @Daniel Compatibility. Commented Sep 17, 2012 at 19:16
  • @HeikoOberdiek Yes, but ... compatibility to what? Given that PNG is (historically) newer than PDF and no other driver seems to give PNG precedence over PDF this seems to be quite strange.
    – Daniel
    Commented Sep 18, 2012 at 7:50
  • 1
    @Daniel Compatibility to older versions of pdftex.def. Commented Sep 18, 2012 at 8:02
  • 2
    @Daniel I am the wrong person to ask, because my maintenance does not start from the very beginning. PDF is much more complicate for including. Perhaps PNG was earlier supported by pdfTeX or PDF inclusion was too unstable in early versions of pdfTeX. Commented Sep 18, 2012 at 8:35

If someone came here because he/she tried to take e.g. .pngs instead of .pdfs for the draft, put this in your preamble:


Feel free to adapt this to your needs.


As of ~2021 (MiKTeX 21.7), it seems the order has been updated. (install directory e.g. MiKTeX)\tex\latex\graphics-def\pdftex.def, line 586:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .