sagidM / s3-resizer

AWS Lambda for resizing images in S3 on fly.
MIT License
224 stars 78 forks source link

Fix for files that are rotated after resizing #1

Closed adamivancza closed 5 years ago

adamivancza commented 5 years ago

Example image to reproduce the issue: http://smartuploader.s3-website-us-east-1.amazonaws.com/uploads/sizes/1548235941338/0ca4075d-4039-4fbe-8341-32f0ee75a2a2.jpeg

sagidM commented 5 years ago

Hi Adam

Thank you for contributing. I will look through your suggestion later on.

adamivancza commented 5 years ago

updated my PR @sagidM

sagidM commented 5 years ago

It seems you've forgotten to use func, removing case clause =) https://github.com/sagidM/s3-resizer/blob/f49db24ef16d436d9cedfe3a4e3fa995a5982eb6/index.js (options must contain fit; max => 'inside', min => 'outside')

Since in one-line object there's no spaces, it contrasts using spaces in one place. {myObject: '!'}, { yourObject: '!' }


By the way, I don't remember why I chose that name; would not it be better to rename func => action? What do you think?

adamivancza commented 5 years ago

ohhh right - I've added that missing handler for func. Yeah that was a good shout to rename func to action - definitely makes more sense that way :)

sagidM commented 5 years ago

Okay, we have done here. I will update setting up instructions and upload a new release later on. Thank you very much Adam!

sagidM commented 5 years ago

Did that by mistake...

adamivancza commented 5 years ago

Awesome - thanks for all the suggestions on the PR :)