Opened 11 years ago
Closed 11 years ago
#34460 closed enhancement (duplicate)
wp_img_add_srcset_and_sizes function: Make the fallback set the width variable
| Reported by: | jaspermdegroot | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 4.4 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | performance |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #34430. Please see the patches there, they do this and a lot of other optimizations.