[Tex/LaTex] Image placeholder as in \includegraphics[draft], but without path appearing


I want to upload a talk slides to a repository where all material submitted shall be under a certain license. For this, I need to exclude certain images present in the actually sued slides for which the license does not apply, adn have a placeholder instead.
\includegraphics[draft,.. pretty much does what I want, only that the actual command in my document is something like


which results in the full path being displayed in, and exceeding the placeholder box.

Can I somehow prevent the path from being displayed? It is both ugly and contains more information than I want to convey. Filename alone would be ok, but is not required. If I remove \includegraphics entirely, the layout changes and/or I would have to manually size and place the placeholder.

Best Answer

Here's a solution that adds a noincl key:






    \vbox to \Gin@req@height{%
      \hrule \@width \Gin@req@width
          \raggedright\footnotesize Not included for copyright reasons
      \rlap{\kern3\p@ \tiny\ttfamily\filename@base.\filename@ext}%




enter image description here