Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESPECT_ORIENTATION is not working anymore #135

Closed
mberneis opened this issue Jul 25, 2019 · 7 comments
Closed

RESPECT_ORIENTATION is not working anymore #135

mberneis opened this issue Jul 25, 2019 · 7 comments

Comments

@mberneis
Copy link

I have set the environment variable RESPECT_ORIENTATION to TRUE. - Version 3 worked correctly but with the new AWS change I redeployed the latest and the image does not rotate anymore
Example:
https://d3tao6gbu16fr0.cloudfront.net/250x250/PetPic_990000003017241.png

@hyoa
Copy link

hyoa commented Jul 26, 2019

serverless-image-handler is now using Sharp, that does not work work RESPECT_ORIENTATION I think.
I had to manually add the rotate from Sharp in the code

Maybe you can use the fork to have it working : #127

@mberneis
Copy link
Author

I got it to work with Sharp - If you pass null into the rotate filter it uses the EXIF orientation:
i.e.:

{
    "bucket": myBucket,
    "key": myKey,
    "edits": {
      "resize": {
        "width": 200,
        "height": 200,
        "fit": "cover"
      },
      "rotate":null
    }
  }

@jaimemnds
Copy link

jaimemnds commented Mar 30, 2020

As of version version 4.1 it looks like this method of passing a null rotate filter doesn't work.
I'm facing the same issue where the EXIF orientation tag value is ignored and all the EXIF metadata get split off after the image goes through the Image Handler.
Does anybody have any tip for me to solve this issue?

Edit: actually, the rotate filter seems to be ignored at all, even if I set other values to it.

@beomseoklee
Copy link
Member

@jaimemnds Did you mean even though you put rotate value, it does not rotate the image? Can you give me some examples?

@jaimemnds
Copy link

@beomseoklee thanks for your reply.
I realized there was an error on my side, my edits JSON was formatted on a wrong way (I was putting the rotate entry inside the resize) 🤦‍♂.

The method of sending rotate: null works fine!

Thanks a lot for your attention and sorry for my negligence.

@dexcell
Copy link

dexcell commented Apr 20, 2020

@mberneis
Thanks for the magic rotate null
This thing should be documented on site/front page, it's so important.

@marco910
Copy link

I have the same issue: When requesting a portrait image in the browser I'm getting it back rotated.

I'm not using JSON to make my requests. How can I implement your workaround in the URL request?

thisismana added a commit to thisismana/serverless-image-handler that referenced this issue Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants