#54937 closed defect (bug) (fixed)
EXIF image orientation issue
Reported by: | tbember | Owned by: | antpb |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Media | Keywords: | has-patch commit add-to-field-guide |
Focuses: | Cc: |
Description (last modified by )
Description:
Images with EXIF orientation flag can be displayed in wrong orientation.
Steps to reproduce:
Go to the WordPress Media Library screen and upload images 2, 4, 5, 7 (either portrait or landscape) from the repo below - the images should display in wrong orientation.
https://github.com/recurser/exif-orientation-examples
Cause:
On wp-includes/class-wp-image-editor.php, the function flip() is being called with swapped parameters.
I presume there was probably some confusion around the meaning of $horz and $vert params. Rather than flipping the image horizontally and vertically, respectively, they actually flip the image along the horizontal and vertical axis, respectively, which is the complete opposite behavior. This subject has already been discussed on: #23775.
Proposed solution
Apply the attached patch.
Attachments (2)
Change History (17)
#1
@
3 years ago
- Description modified (diff)
- Milestone changed from Awaiting Review to 6.0
- Version changed from 5.9 to 5.3
This ticket was mentioned in Slack in #core by mike. View the logs.
2 years ago
This ticket was mentioned in Slack in #core-media by mike. View the logs.
2 years ago
#4
@
2 years ago
This came up in a bug scrub for 6.0, and I brought it up for discussion / testing in #core-media.
#5
@
2 years ago
- Milestone changed from 6.0 to 6.1
The patch still applies cleanly against trunk
. However, as it still needs testing and today is 6.0 RC1, I'm moving this ticket to the 6.1 milestone.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
This ticket was mentioned in PR #3246 on WordPress/wordpress-develop by adamsilverstein.
2 years ago
#10
Trac ticket: https://core.trac.wordpress.org/ticket/54937
#11
@
2 years ago
- Keywords commit added; needs-testing removed
The fix looks good here, I verified this corrects the rotation for the test set images.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
2 years ago
This ticket was mentioned in PR #3295 on WordPress/wordpress-develop by antpb.
2 years ago
#13
Core Patch: https://core.trac.wordpress.org/ticket/54937
This PR is only for testing purposes.
Hi there, welcome to WordPress Trac! Thanks for the ticket and the patch.
The code in question was added in [46202] / #14459, changing the version accordingly.
Moving to 6.0 for investigation.