# Remove images from draft, even the ones defined in a {figure*}

I'm trying to compile a draft of my .tex document, leaving out all the figures. The answer given here, ie:

\usepackage{comment}
\excludecomment{figure}
\let\endfigure\relax


works for images included in a \begin{figure} block, but not for a \begin{figure*} one.

I tried adding a \excludecomment{figure*} line to the above block, but I get an error:

Extra }, or forgotten \endgroup. [\end{figure*}]


How can I exclude all images from the final PDF?

\usepackage{comment}

The problem is that you can't work with names containing * out of the box. This is a "hack" to make the figure* environment do exactly the same as figure.