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: |
|
Owned by: |
|
---|---|---|---|
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
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 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
@
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.
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.