When displaying images on our website, we check if the file exists with a call to file_exists(). We fall back to a dummy image if the file was missing.
I came to this page looking for a solution, and it seems fopen may do the trick. If you use this code, you might want to disable error logging for the files that are not found.