Check if an image is loaded