Opened 8 years ago
Closed 8 years ago
#34460 closed enhancement (duplicate)
wp_img_add_srcset_and_sizes function: Make the fallback set the width variable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Media | Keywords: | |
Focuses: | performance | Cc: |
Description
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.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
Duplicate of #34430. Please see the patches there, they do this and a lot of other optimizations.