# Redefine graphicx draft mode

How to redefine draft mode for graphicx package not to draw figure borders but only image path? I would like to print the document without pictures and then stick photos.

-
Welcome to TeX.sx! – egreg Jan 20 '13 at 16:03

The box drawing depends on the rather complex command \Gin@setfile; however some patches can be "easily" applied:

\documentclass{article}
\usepackage[draft]{graphicx}

% Let's patch \Gin@setfile rather than copying its definition and change it
\usepackage{etoolbox}
\makeatletter
\patchcmd\Gin@setfile{\vrule\hss}{\vrule\@width\z@\hss}{}{}
\patchcmd\Gin@setfile{\hss\vrule}{\hss\vrule\@width\z@}{}{}
\patchcmd\Gin@setfile{\hrule\@width}{\hrule\@height\z@\@width}{}{}
\patchcmd\Gin@setfile{\vss\hrule}{\vss\hrule\@height\z@}{}{}
\makeatother

\begin{document}

\includegraphics{filename}

\end{document}

-