Is there a way to tell browsers to honor the jpeg exif orientation?

前端 未结 7 1496
轻奢々
轻奢々 2020-11-30 02:12

I know that the automatic rotation of JPG files is disabled in browsers.

They can not enable it because it would break the layout of some websites.

Is there

7条回答
  •  悲哀的现实
    2020-11-30 03:02

    From the latest update of chromium/chrome version 81, it will support exif orientation from image itself. This means that the exif orientation when present in an image, will be used to orient the image unless the "image-orientation: none" CSS property is present.

    Before this update, you may used any other work around to rotate images or manually rotate based on the known image orientation. Then the newer chrome 81 will automatically rotate the image. If you need to avoid the automatic rotation and continue with the same work around option used for older chrome , you may need to set image-orientation: none, because now the image-orientation value is from-image by default.

    image-orientation support chrome 81

提交回复
热议问题