There are several different questions here so I am going to address only the main one which appears to be the hiding of specified graphics. It is presumed that the image file exists (and has a particular dimension) and the aim is to produce either a space or a placeholder that would be the same size as would be produced, while at the same time not making the image available to the reader. This could serve the purpose of reducing file size in a draft, or acting as a placeholder for an incorrect image. You could do something like the below, measuring the image and then inserting a tikz node in its place. By altering the code you could remove or alter the text inside, and remove the border at various times.
I did this by defining a variant of \includegraphics (\includegraphicsd)
\documentclass{article}
\usepackage{tikz}
\usepackage{xparse}
\usepackage{graphicx}
\newsavebox\abimagebox
\DeclareDocumentCommand \includegraphicsd { o m }{%
\sbox\abimagebox{\includegraphics[#1]{#2}}%
\begin{tikzpicture}
\node[draw, dashed, text width=\the\wd\abimagebox,minimum height=\the\ht\abimagebox, align=center, inner sep=0]{This is white};%
\end{tikzpicture}%
}%
\begin{document}
%This image is shown
\begin{figure}[htbp]
\centering
\includegraphics[width=0.345\textwidth]{example-image-a}
\caption{Close up of an opossum, part of the genus of piglet.}
\end{figure}
%This one is not shown
\begin{figure}[htbp]
\centering
\includegraphicsd[width=0.345\textwidth]{example-image-a}
\caption{Close up of an opossum, part of the genus of piglet.}
\end{figure}
\end{document}
