image-orientation

Controls whether an image is automatically rotated based on its 'EXIF' metadata (data captured by cameras about how the photo was taken).

It is documented as part of the CSS Images specification.

/* Usage Example */
img {
  /* Ensures the image is correctly oriented based on camera data */
  image-orientation: from-image;
}

/* Syntax */
image-orientation: from-image;
image-orientation: flip;

/* Global values */
image-orientation: inherit;
image-orientation: initial;
image-orientation: revert;
image-orientation: revert-layer;
image-orientation: unset;
Widely available Since 2020 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

81+
26+
13.1+
81+

New CSS drops.

Join 750+ readers who've survived clearfix hacks.

ESC