Make WordPress Core

Opened 3 months ago

Last modified 4 weeks ago

#58611 assigned defect (bug)

wp_get_missing_image_subsizes can return incorrect subsizes for a rotated image

Reported by: ianmjones's profile ianmjones Owned by: antpb's profile antpb
Milestone: 6.4 Priority: normal
Severity: normal Version: 6.2.2
Component: Media Keywords: needs-patch
Focuses: Cc:

Description

During the upload of a rotated image to the Media Library, the wp_get_missing_image_subsizes() function often returns missing subsizes for the non-rotated original image that will never be generated for the rotated image.

This means for example, if a plugin is filtering wp_update_attachment_metadata and waiting for all thumbnails to have been generated before performing some action, it may be told that there are missing thumbnails for a rotated image, that will not be generated. Therefore it will not be able to perform that action as not all the thumbnails are deemed to be available.

Change History (10)

This ticket was mentioned in PR #4681 on WordPress/wordpress-develop by @ianmjones.


3 months ago
#1

  • Keywords has-patch added; needs-patch removed

During the upload of a rotated image, the wp_get_missing_image_subsizes() function currently incorrectly uses the dimensions of the non-rotated original image to determine which subsizes should exist.

This changeset adds a condition that the original image should only be used for setting the image dimensions if the orientation of the Media Library item has not been changed.

This ticket was mentioned in Slack in #core-media by ianmjones. View the logs.


3 months ago

#3 @antpb
3 months ago

  • Milestone changed from Awaiting Review to 6.3

#4 @antpb
3 months ago

  • Owner set to antpb
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core-media by ianmjones. View the logs.


3 months ago

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 months ago

This ticket was mentioned in Slack in #core-media by ianmjones. View the logs.


3 months ago

#8 @azaozz
3 months ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 6.3 to 6.4

Moving this to 6.4 as it needs a patch.

This ticket was mentioned in Slack in #core by marybaum. View the logs.


4 weeks ago

#10 @marybaum
4 weeks ago

Asking @antpb if maybe the EXIF data import should not include the rotation data.
Then we can consider an acceptable patch.

Note: See TracTickets for help on using tickets.