-
Notifications
You must be signed in to change notification settings - Fork 566
Description
I need to change the Thumbor to not rotate images by default by changing this config value
RESPECT_ORIENTATION = True
to avoid the case like the attached image (basically all landscape mobile photos)
(I'm befuddled why RESPECT_ORIENTATION is False by default? Why would we want Thumbor to rotate an source image w/out explicitly asking for it?)
I'm on Mac OS X (High Sierra) - checked out repo, set up Python w/ virtualenv, ran ./build-s3-dist.sh {{bucketname...actually doesn't matter}}
and all compiled well locally - then I uploaded the generated file from dist/serverless-image-handler.zip
into an s3 bucket (needed to do that rather than direct upload since > 50MB) and then uploaded from the associated Lamda.
Excited to see my images not rotated...but got an internal server error
trying to render an image and looking at CloudWatch see the following:
Unable to import module 'image_handler/lambda_function': /var/task/PIL/_imaging.so: invalid ELF header
Almost sure this is b/c I'm compiling in an environment that (OS X) that doesn't match that of the Lamda. (@arahayrabedian apparently had more luck: #11 - guessing he was on Linux?)
Any hints? Do I need to spin up an EC2 Linux or use Docker?
This is a lot of pain for a 1 line change! I wish Thumbor config files be adjusted from Lamda environment variables, but I believe they're build time so not possible.