[wp-trac] [WordPress Trac] #53232: Add async decoding attribute as default to the HTML image tags generated by WordPress
WordPress Trac
noreply at wordpress.org
Thu Jun 9 05:30:13 UTC 2022
#53232: Add async decoding attribute as default to the HTML image tags generated by
WordPress
-------------------------------------------------+-------------------------
Reporter: isaumya | Owner:
| adamsilverstein
Type: feature request | Status: closed
Priority: normal | Milestone: 6.1
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests needs-dev- | Focuses:
note needs-refresh early | performance
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"53480" 53480]:
{{{
#!CommitTicketReference repository="" revision="53480"
Media: Add `decoding="async"` to image attributes.
Dynamically add `decoding="async"` to image tags on the front end of a
site to instruct browsers to download them in parallel.
Modifies `wp_get_attachment_image()`, `get_avatar()` to include the
attribute by default. Modifies `wp_filter_content_tags()` to add the
attribute during the front-end render of the site.
Introduces `wp_img_tag_add_decoding_attr()` to take an image tag and
modify it to include the attribute. Introduces the filter
`wp_img_tag_add_decoding_attr` used to define the default value for the
attribute.
Props adamsilverstein, ayeshrajans, costdev, flixos90, hellofromtonya,
isaumya, michaelbourne, mihai2u, mitogh, sergiomdgomes, spacedmonkey,
westonruter, peterwilsoncc.
Fixes #53232.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53232#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list