[wp-trac] [WordPress Trac] #61847: Auto Sizes for Lazy-loaded Images
WordPress Trac
noreply at wordpress.org
Wed Sep 11 00:00:10 UTC 2024
#61847: Auto Sizes for Lazy-loaded Images
---------------------------------------------+--------------------------
Reporter: mukesh27 | Owner: joemcgill
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.7
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses: performance
---------------------------------------------+--------------------------
Changes (by joemcgill):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"59008" 59008]:
{{{
#!CommitTicketReference repository="" revision="59008"
Media: Add auto sizes for lazy-loaded images.
This implements the HTML spec for applying auto sizes to lazy-loaded
images by prepending `auto` to the `sizes` attribute generated by
WordPress if the image has a `loading` attribute set to `lazy`. For
browser that support this HTML spec, the image's size value will be set to
the concrete object size of the image. For browsers that don't support the
spec, the word "auto" will be ignored when parsing the sizes value.
References:
- https://html.spec.whatwg.org/multipage/images.html#sizes-attributes
- https://github.com/whatwg/html/pull/8008
Props mukesh27, flixos90, joemcgill, westonruter, peterwilsoncc.
Fixes #61847.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61847#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list