I'm reading the tutorial on LaTeX by overleaf, and in their section Adding Images they have some example code:
\documentclass{article} \usepackage{graphicx} \graphicspath{ {images/} }\begin{document} The universe is immense and it seems to be homogeneous, in a large scale, everywhere we look at.
\includegraphics{universe}
There's a picture of a galaxy above \end{document}
When explaining the \includegraphics{universe} part of that they say:
The
\includegraphics{universe}command is the one that actually included the image in the document. Here universe is the name of the file containing the image without the extension, then universe.PNG becomes universe. The file name of the image should not contain white spaces nor multiple dots.
My question really comes down to this: If I had in that folder both universe.png and universe.jpg what would be chosen? Why?
\def\Gin@extensions{.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2}– Phelype Oleinik Oct 29 '20 at 17:24pdfLaTeX, what @PhelypeOleinik said. Take a look at the definitions inside<path to texlive>/texmf-dist/tex/latex/graphics/, intexmf-dist/tex/latex/graphics-def, and intexmf-dist/tex/latex-dev/graphics. There are some.deffiles in which the different backends are managed. – Skillmon Oct 29 '20 at 17:27