fix access to image dimensions if the image is not found