guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 121 forks source link

prevent autorotation on image display and crop page #4132

Closed andrew-nowak closed 1 year ago

andrew-nowak commented 1 year ago

What does this change?

Some images with rotation metadata get autorotated if the requested image means imgops doesn't have to transform. Browsers see the metadata and do the rotation. There is a CSS property to control this, but to take effect it needs the crossorigin property set on the <img> - even if setting to the default anonymous

There is another bug in Firefox <= 113 which will prevent this having an effect.

How should a reviewer test this change?

Check with an image with rotation metadata (@paperboyo knows one in guardian grid)

How can success be measured?

Grid chooses to explicitly ignore rotation metadata (until we also support it in the backend! then we'll make good use of it!)

andrew-nowak commented 1 year ago

turns out it doesn't work on cropper page, (needs more investigation), but it doesn't make anything worse so not reverting :)

prout-bot commented 1 year ago

Seen on auth, usage, image-loader, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (created by @andrew-nowak and merged by @paperboyo 23 minutes and 47 seconds ago) Please check your changes!