I would like to share the final result from what I got on stackexchange.
Maybe it is of use for someone ...
The following document implements a 'public' command printFigure that is to be placed within a floating environment (like figure in this example).
It takes the same two arguments as \includegraphics.
If the given filename points to a valid image file the command behaves normally, but if it can't print the image it prints a colored box instead and colors the lof entry.
The point of this isn't mainly to notice missing image files (which is already quite handy because I manage everything with remote Git repositories and have to generate image file on each computer separately.
More important is the option to enter images that aren't created yet, just to get the structure clearer while writing the document.
I will soon rerelease this as part of a package that manages music examples.
\documentclass[]{article}
\usepackage[export]{adjustbox}
\usepackage{caption}
\usepackage{xcolor}
\makeatletter
\newif\ifgraphicexist
\catcode`\*=11
\newcommand\ifvalidimage[1]{%
\begingroup
\global\graphicexisttrue
\let\input@path\Ginput@path
\filename@parse{#1}%
\ifx\filename@ext\relax
\@for\Gin@temp:=\Gin@extensions\do{%
\ifx\Gin@ext\relax
\Gin@getbase\Gin@temp
\fi}%
\else
\Gin@getbase{\Gin@sepdefault\filename@ext}%
\ifx\Gin@ext\relax
\global\graphicexistfalse
\def\Gin@base{\filename@area\filename@base}%
\edef\Gin@ext{\Gin@sepdefault\filename@ext}%
\fi
\fi
\ifx\Gin@ext\relax
\global\graphicexistfalse
\else
\@ifundefined{Gin@rule@\Gin@ext}%
{\global\graphicexistfalse}%
{}%
\fi
\ifx\Gin@ext\relax
\gdef\imageextension{unknown}%
\else
\xdef\imageextension{\Gin@ext}%
\fi
\endgroup
\ifgraphicexist
\expandafter \@firstoftwo
\else
\expandafter \@secondoftwo
\fi
}
\catcode`\*=12
\makeatother
% Now define a command that colors a lof entry red.
% This is necessary because the parts in \DeclareCaptionListFormat
% are put in separate groups by LaTeX.
\DeclareRobustCommand{\colortwogroups}{\makeredaux\aftergroup\makeredaux}
\newcommand\makeredaux{\color{red}}
% Declare a caption list format for use with missing images
\DeclareCaptionListFormat{missingfig}{\colortwogroups#1 #2}
\newcommand{\printFigure}[2][]{%
\ifvalidimage{#2}
{% If we have a correct image file:
\noindent
% 'max width' courtesy of adjustbox
\includegraphics[max width=\textwidth,#1]{#2}
}%
{% if we don't find an appropriate image:
\bigskip
% make the caption red (in the \listoffigures)
\captionsetup{listformat=missingfig}%
% print a box instead of the image
\fcolorbox{red}{yellow}{%
\parbox[c]{.7\textwidth}{~\\
\textbf{\textsf{Missing image:}}\\
#2\\
}
}
\bigskip
}
}
\begin{document}
\begin{figure}
\printFigure{bsp1}
\caption{A quite fancy music example}
\end{figure}
\begin{figure}
\printFigure{bsp2}
\caption{Another quite fancy music example}
\end{figure}
\listoffigures
\end{document}

draftoption for your documentclass to have empty boxes instead of the picture itself. – Count Zero Feb 20 at 11:48