What is EXIF Orientation?

EXIF Orientation is metadata describing how stored image pixels should be rotated or reflected for display. A portrait photograph can have a landscape-shaped pixel matrix whose orientation tag tells the viewer how to present it.

How EXIF Orientation works

The orientation field expresses one of eight arrangements, including reflections as well as rotations. Software that honors the field can display the same stored pixels differently from software that ignores it. A pipeline can normalize the pixels themselves and then clear the instruction, or retain the pixel layout and preserve the instruction throughout the delivery path. Mixing those policies causes sideways previews or double rotation.

Key facts

  1. Orientation tells software how to rotate or mirror the stored pixels for display. It does not record a compass heading or the camera’s pose.
  2. Stripping EXIF before honoring orientation can change how the image appears even when the stored pixel matrix is untouched.
  3. Check whether crop coordinates refer to the stored pixels or the displayed, orientation-corrected image. A crop chosen in a portrait preview can select the wrong region if applied to the unrotated pixels.
  4. Reconcile duplicated orientation fields too. For example, sharp’s autoOrient removes the EXIF tag after transforming pixels but leaves XMP tiff:Orientation untouched.

When EXIF Orientation matters

Apply orientation consistently before calculating crops or preview dimensions. When physically transforming pixels into their display orientation, remove or reset the old instruction so it is not applied a second time.

Sources

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free