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

前端 未结 7 1497
轻奢々
轻奢々 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 02:51

    Since Chrome 81, image EXIF orientation is respected by default. Latest Safari (13.1 as of now) is also working correctly.

    Firefox hasn't fully implemented this (see Bugzilla issue #1616169).

    Here's a couple test pages I found:

    • https://image-orientation-test.now.sh
    • https://softov.org/oria/image-orientation

    As for the standard, the image-orientation property is now marked deprecated on the latest CSS Images Level 3 spec draft:

    'image-orientation'
    This property is deprecated, and is optional for implementations.

提交回复
热议问题