How do we know whether the image is a jpeg here?