[wp-trac] [WordPress Trac] #34460: wp_img_add_srcset_and_sizes function: Make the fallback set the width variable
WordPress Trac
noreply at wordpress.org
Mon Oct 26 21:14:18 UTC 2015
#34460: wp_img_add_srcset_and_sizes function: Make the fallback set the width
variable
----------------------------+-----------------------------
Reporter: jaspermdegroot | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: performance |
----------------------------+-----------------------------
Passing the width to {{{wp_get_attachment_image_sizes()}}} prevents a call
to {{{image_get_intermediate_size()}}} so we can improve performance by
setting the {{{$width}}} variable if metadata is used to get the image
size.
Related #34430. See
https://core.trac.wordpress.org/attachment/ticket/34430/34430.2.diff which
removes the $width argument from wp_get_attachment_image_sizes() and uses
$size_array (array( width, height)) instead.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34460>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list