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.
file_exists()
Howe
Create a hashing routine for sharding the files into multiple sub-directories.
filename.jpg -> 012345 -> /01/23/45.jpg
Also, you could use mod_rewrite to return your placeholder image for requests to your image directory that 404.