My attempt was to redefine \includegraphics:
\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{letltxmacro}% http://ctan.org/pkg/letltxmacro
\usepackage{xparse}% http://ctan.org/pkg/xparse
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\LetLtxMacro{\oldincludegraphics}{\includegraphics}
\RenewDocumentCommand{\includegraphics}{O{} m}{% \includegraphics[..]{...}
\begingroup\setlength{\fboxsep}{-\fboxrule}%
\fbox{\phantom{\oldincludegraphics[#1]{#2}}}\endgroup%
}
\begin{document}
\lipsum[1-2]
\begin{figure}
\centering
\oldincludegraphics[height=3cm]{tiger} \quad
\includegraphics[height=3cm]{tiger} \quad
\fbox{\phantom{\oldincludegraphics[height=3cm]{tiger}}}
\caption{This is a tiger}
\end{figure}
\lipsum[3-5]
\end{document}

In the above example, the three images use (i) the original \oldincludegraphics command, followed by (ii) the newly redefined \includegraphics command, followed by (iii) an \fbox{\phantom{\oldincludegraphics{...}}} without the proper \fboxsep set, merely as an illustration of what modification does. The grouping (via \begingroup and \endgroup) within \includegraphics makes sure that setting \fboxsep=-\fboxrule is only local.
letltxmacro provides an effective means to store (or copy) commands that have optional arguments (in this case, the original \includegraphics from the graphicx package), while xparse provides an easy means for specifying commands with (possibly intermixed) optional parameters through \RenewDocumentCommand.
\patchcmdinstruction: Does it matter for the command's operation that the command\Gin@setfileis located in the filegraphics.styrather than ingraphicx.sty? (The former style file is loaded by the latter...) Separately, might it be safer to replace the assignment\edef\@tempa{#3}, in the preceding line of the code for the\Gin@setfilecommand, with\edef\@tempa{}? Please advise. – Mico Oct 02 '11 at 15:48\@tempaline can be left as it is, as it won't produce any side effects. – Andrey Vihrov Oct 02 '11 at 16:00\@tempato be empty, rather than have it contain the filename string, might be less intrusive than obliterating the next command. However, that's pure speculation on my part. – Mico Oct 02 '11 at 16:12\@tempato an empty value would work. – Andrey Vihrov Oct 02 '11 at 16:34