Some images being uploaded with incorrect orientation

Description

Some images are being uploaded with incorrect orientation, even though such metadata likely exists in the image file.

To reproduce:

  • find a JPEG image with EXIF data containing an orientation value other than 1

  • if you're running from the pull request branch (https://github.com/fluid-project/sjrk-story-telling/pull/50), you can refer to the test images in the "tests\testData" directory

  • add a new image block and upload that image

Expected: the image will be the correct orientation that matches what is seen in the Finder upload dialog or on the mobile device (see attached screenshot "working")

Actual: the image is rotated 90 or 180 degrees and looks incorrect (see attached screenshot "not working")

The image will have the incorrect orientation both in the story editor preview as well as in the published story

Environment

MacOS (version?) both in Safari and Chrome

Attachments

2

Activity

Show:

Cindy Li November 20, 2019 at 3:50 PM

The pull request has been merged into the project repo "stories-floe-dev" branch at this commit.

Gregor Moss October 15, 2019 at 7:31 PM
Edited

the image-orientation property is now deprecated and should not be depended upon to solve this issue. It would seem that the rotate-upon-saving approach is the best for the time being. I have begun implementing jpeg-autorotate to this end.

https://www.w3.org/TR/css-images-3/#propdef-image-orientation

Gregor Moss October 11, 2019 at 9:13 PM

This may be promising, could potentially add this as Kettle middleware called on image save: https://www.npmjs.com/package/jpeg-autorotate

Gregor Moss October 9, 2019 at 6:49 PM

Gregor Moss October 9, 2019 at 6:47 PM

Fixed

Details

Assignee

Reporter

Components

Priority

Created September 12, 2019 at 11:38 PM
Updated March 16, 2020 at 1:44 AM
Resolved November 20, 2019 at 3:50 PM