coderef

image-orientationBaseline · Widely available

The image-orientation CSS property corrects the rotation of an image using the image's metadata, such as EXIF.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 13, 2020. Widely available since Oct 13, 2022.

Browser support

DesktopChrome
1–80Not supported
81+Supportedsince Apr 7, 2020
Current: 155
Edge
12–80Not supported
81+Supportedsince Apr 13, 2020
Current: 154
Firefox
1–25Not supported
26+Supportedsince Dec 10, 2013
Current: 157
Safari
1–13Not supported
13.1+Supportedsince Mar 24, 2020
Current: 27
MobileChrome Android
18–80Not supported
81+Supportedsince Apr 7, 2020
Current: 155
Firefox Android
4–25Not supported
26+Supportedsince Dec 10, 2013
Current: 157
Safari iOS
1–13Not supported
13.4+Supportedsince Mar 24, 2020
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: image-orientation.

Feature detection

CSS · check before using
@supports (image-orientation: initial) {
  /* styles that rely on image-orientation */
}

/* or in JavaScript */
if (CSS.supports("image-orientation", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (3). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
image-orientation81812613.1812613.4
image-orientation.from-image81812613.1812613.4
image-orientation.none81812613.1812613.4