Check if an image exists