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

Auto rotate JPG images with EXIF orientation tag #6768

Merged
merged 2 commits into from Jul 18, 2020

Conversation

alxnkt
Copy link
Contributor

@alxnkt alxnkt commented Jun 22, 2020

Description of what you did:

Feature for auto rotation of JPEG images having EXIF tag Orientation (fixes #5996). Some digital cameras and smartphones store images regardless of theirs orientation (landscaped of portrait). Information about orientation and mirroring is stored in EXIF meta-data.

rotate function of sharp library is used. An image is rotated if Orientation tag is defined. Otherwise it is uploaded "as is". The use of rotate implies the removal of the EXIF Orientation tag, if any.

rotate

Feature can be turned on/off in Media Library settings. Left image uploaded with the feature turned on.

@alxnkt alxnkt marked this pull request as draft June 22, 2020 20:12
@alxnkt alxnkt closed this Jun 23, 2020
Signed-off-by: alxnkt <alxnkt@mail.ru>
@alxnkt alxnkt reopened this Jun 23, 2020
@alxnkt alxnkt changed the title [WIP] Auto rotate JPG images with EXIF orientation tag Auto rotate JPG images with EXIF orientation tag Jun 23, 2020
@alxnkt alxnkt marked this pull request as ready for review June 23, 2020 18:21
soupette
soupette previously approved these changes Jul 16, 2020
Copy link
Contributor

@soupette soupette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the front-end part

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alxnkt Nice work ! Could you add a small description of what the auto orientation does so users know about it in the settings view :)

Signed-off-by: alxnkt <alxnkt@mail.ru>
@alxnkt
Copy link
Contributor Author

alxnkt commented Jul 18, 2020

Hi @alxnkt Nice work ! Could you add a small description of what the auto orientation does so users know about it in the settings view :)

Done ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature request Issue suggesting a new feature source: core:upload Source is core/upload package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rotation of uploaded images
3 participants