Page MenuHomePhabricator

Incorrect orientation of some thumbnails
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

For some images, the orientation of the thumbnail generated by my local version of thumbor-plugins is different to the one generated on beta.

betalocal
320px-..._beta.jpg (320×427 px, 29 KB)
320px-..._local.jpg (320×427 px, 18 KB)
Reproduction

My configuration (thumbor.conf) is: P34931

I generate the thumbnail on my local system by going to the url: http://localhost:8800/thumbor/unsafe/<width>x/<url>.

I have reproduced it with thumbor running in docker on Buster:

$ blubber .pipeline/blubber.yaml dev > Dockerfile
$ make build

I have also reproduced this when I installed locally via python on Bullseye:

python3 -m pip install -r requirements.txt
Other images which reproduce this bug
Environment

Operating system: Debian Buster and Bullseye
thumbor-plugins: commit 92eafe2477fdd122244b572e1a0f57652bdbc8f8

Event Timeline

Orientation gets really tricky when an image has conflicting information in EXIF vs XMP or even native fields, and multiple libraries and also MediaWiki have had faulty behaviour on this front.
If we are working with newer versions of libraries, which had fixes for the priority order of these fields, then maybe that is what is at play here ?

Specifically.. these seem all to be 90 or 270 degree EXIF rotated images, meaning that logically they are width/height flipped, and correct representation depends the EXIF information in the file.

There is a hint here in https://github.com/aws-solutions/serverless-image-handler/issues/235 which implies that this can be because metadata is stripped before thumbnailing, that might be related ?

So, I think the difference I am seeing is because I had not set RESPECT_ORIENTATION = True in my local thumbor config file. That option is set on beta. The default for that option is False.

When I add that option to my local thumbor config, the 4 files mentioned in the description are rendered in the correct orientation.

@roman-stolar @Vlad.shapik please double-check, but I think this bug is a false alarm.

So, I think the difference I am seeing is because I had not set RESPECT_ORIENTATION = True in my local thumbor config file. That option is set on beta. The default for that option is False.

When I add that option to my local thumbor config, the 4 files mentioned in the description are rendered in the correct orientation.

@roman-stolar @Vlad.shapik please double-check, but I think this bug is a false alarm.

Hi @dom_walden
I've double-checked your assumptions and everything works fine with RESPECT_ORIENTATION = True as you described. There is no bug related to the incorrect orientation of thumbnails.
Thank you.