[wp-trac] [WordPress Trac] #36345: We shouldn't use "full" as image size name in wp_calculate_image_srcset()
WordPress Trac
noreply at wordpress.org
Wed Jul 6 14:04:08 UTC 2016
#36345: We shouldn't use "full" as image size name in wp_calculate_image_srcset()
------------------------------+------------------------
Reporter: jaspermdegroot | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.6
Component: Media | Version: 4.4
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+------------------------
Changes (by joemcgill):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"37986"]:
{{{
#!CommitTicketReference repository="" revision="37986"
Media: Don't use 'full' as array key in `wp_calculate_image_srcset()`.
In `wp_calculate_image_srcset()` we get an array of image sizes
associated with an attachment and then add the original image's
information to the array before processing the `srcset`. In doing
so, we set the original data to a `$image_sizes['full']` key, which
could stomp on any custom image sizes using `full` as a size name.
This avoid the issues by adding the original data without a named
key, which is never referenced anyway.
Props jaspermdegroot.
Fixes #36345.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36345#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list