[Tex/LaTex] way to typeout the contents of \graphicspath


First of let me admit that I've very new to the LaTeX, so this may be obvious and I just do see it, but here's my question:

I'm trying to write a set of macros to automatically downsample images… sort of like degrade.sty, but for images that are inserted at arbitrary sizes in the document. What I would like to do is redefine \includegraphics so that this can be accomplished for existing documents. In order to find the intended graphics file, I need to know what paths are currently in the graphics path. Alas, I cannot figure out how to determine what those paths are. Is this possible?

Best Answer

The paths for graphics - set using \graphicspath - is stored in \Ginput@path as is indicated by \show\graphicspath and viewing the .log file:

> \graphicspath=macro:
#1->\def \Ginput@path {#1}.

\makeatletter\typeout{\Ginput@path}\makeatother will show its contents.