[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
Fri Oct 29 15:36:17 UTC 2021
#53232: Add async decoding attribute as default to the HTML image tags generated by
WordPress
-----------------------------+--------------------------
Reporter: isaumya | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 5.9
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: performance
-----------------------------+--------------------------
Comment (by westonruter):
@isaumya That's a good question. First of all, Priority Hints aren't yet
standardized (see [https://wicg.github.io/priority-hints/ draft spec] and
[https://www.chromestatus.com/feature/5273474901737472 Chrome Platform
status]) so I think it's a bit premature to add the the `importance`
attribute to non-lazy images; it's only supported by Chrome and not any
other browsers.
But secondly, I think adding `importance` should probably be the domain of
themes (or FSE blocks) which can know for sure whether an image is in the
first viewport and it is an important image. It's one thing to omit the
`loading=lazy` attribute to let the browser decide whether to lazy-load,
but it's another thing to add the `importance=high` attribute to tell the
browser to ''PLEASE DOWNLOAD THIS NOW'' when we actually aren't 100%
certain based on our heuristics for whether it will be in the first
viewport.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53232#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list