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 think the best way is to keep the image url in the database and then put it in a session variable especially when you have authentication. These way you dont have to be checking each time a page reloads