Breaking JPEG images are now rotated by default according to Exif data


Categories: CSS

Releases: Firefox 77, Firefox 78 ESR


Firefox 75 has changed the initial value of the image-orientation CSS property from none to from-image, which uses Exif data stored in JPEG images for rotation. Chrome 81 is shipping the property on March 17 with defaulting to from-image, so any compatibility issue could be noticed before Firefox 75 goes out of beta on April 7. If you find certain pictures on your site not rotating properly, you need to modify these image files with a photo editor.

Safari is also shipping the property in the near future.

Update: The novel coronavirus (COVID-19) outbreak is forcing people to spend more time online at home. Due to concerns around making the change with Firefox 75 during such an uncertain time, it has been postponed to a future release. The new behaviour remains enabled on the Nightly channel. We’ll update this note when the situation has changed.

Update 2: Following Chrome 81, the image-orientation property change is riding Firefox 77 along with other changes that honour the Exif orientation information, including:

  • the naturalWidth/naturalHeight properties on the HTMLImageElement interface
  • the CanvasRenderingContext2D.drawImage method
  • CSS decorative images like background-image and border-image

The property change is affecting Slack, where uploaded images are not rotated properly on Firefox 77 as well as Chrome 81.