Last active
December 29, 2020 20:40
-
-
Save afeld/10d85bb67c3cc8c7b7bb to your computer and use it in GitHub Desktop.
fix orientation for all images in an S3 bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reads from EXIF data and applies the appropriate rotation. Requires AWS CLI and ImageMagick. | |
# To use, replace `BUCKET` and run in your terminal. | |
mkdir -p BUCKET/upright | |
cd BUCKET | |
aws s3 sync s3://BUCKET . | |
find . -name "*.jpg" -exec convert {} -auto-orient upright/{} \; | |
aws s3 sync . s3://BUCKET --acl public-read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment