
You can inspect the file structure of your images for example with Exiv2: exiv2 -pS print image.png Nevertheless, some applications may write the Exif metadata after the image data. This way the browser can reserve space and start displaying the image while its loading and the image won't suddently change orientation after it's fully loaded. In order to use the orientation information, web browsers may require that Exif metadata is stored before image data in the image file (see this issue). ( irot & imir) Exif metadata and image data order Here are JPEG test images which should look the same if your browser handles Exif orientation properly: JPEGĪccording to the Exif specification section 4.7.2 JPEG stores Exif metadata in APP1 marker where data starts with the string "Exif\0\0". Next, let's investigate Exif orientation in different image file formats.

It's added or modified by some image preview application, image editor or utility like ExifTool or Exiv2.

It's copied while converting image from one file format to another.Normally it's added by a camera to differentiate landscape and portrait shots.Why would an image even use Exif orientation?

Other image file formats are, however, a different story. Web browsers and other software are slowly getting better at handling Exif orientation, and nowadays, there shouldn't be too many problems with JPEGs. Exif orientation is known to cause problems and over time similar issues have cropped up in different circumstances.
