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

Autorotate images based on EXIF metadata #529

merged 19 commits into from Jul 3, 2019


None yet
3 participants
Copy link

commented Jun 21, 2019

Depends on contao/image#52 and #537

As discussed in contao/image#44 (comment) we want to automatically rotate images if they have an EXIF IFD0-Orientation tag.

Because lighbox images now run through the resizer too I added a contao.image.lightbox_size configuration lightboxSize layout setting where you can define the (maximum) size of your lightbox images. This can be overwritten by providing an $arrItem['lightboxSize'] to the addImageToTemplate() method.

I also added a contao.image.force_re_encoding configuration skipIfDimensionsMatch flag to the image size settings, this might be useful to get the benefits of resizing (like to-RGB-conversion, interlacing, metadata-stripping, sampling factors and specific JPEG-quality) even if no resize is required. (Related: contao/core-bundle#636)

Any opinions on the naming of lightbox_size and force_re_encoding?

@ausi ausi self-assigned this Jun 21, 2019

@ausi ausi referenced this pull request Jun 21, 2019


Autorotate images based on EXIF metadata #52

2 of 2 tasks complete

@leofeyer leofeyer added this to the 4.8 milestone Jun 22, 2019


This comment has been minimized.

Copy link
Member Author

commented Jul 2, 2019

We should merge #537 first, so that I can rebase this PR on it.

@ausi ausi requested review from Toflar and leofeyer Jul 2, 2019


Toflar approved these changes Jul 2, 2019

@ausi ausi force-pushed the ausi:feature/exif-autorotation branch from 139d01b to 14433cf Jul 2, 2019

@leofeyer leofeyer merged commit 94813e3 into contao:master Jul 3, 2019

3 checks passed

Travis CI - Pull Request Build Passed
continuous-integration/appveyor/pr AppVeyor build succeeded
coverage/coveralls Coverage increased (+0.008%) to 87.111%

This comment has been minimized.

Copy link

commented Jul 3, 2019

Thank you @ausi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.