[wp-trac] [WordPress Trac] #44427: Introduce lazy-loading API for media and other elements
WordPress Trac
noreply at wordpress.org
Thu Jul 2 02:01:43 UTC 2020
#44427: Introduce lazy-loading API for media and other elements
-------------------------------------------------+-------------------------
Reporter: mor10 | Owner: flixos90
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.5
Component: Media | Version: 5.4
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion early needs-testing needs-dev-note | performance
-------------------------------------------------+-------------------------
Comment (by flixos90):
In [changeset:"48272" 48272]:
{{{
#!CommitTicketReference repository="" revision="48272"
Media: Improve support for opting out of lazy-loading for template images.
With this changeset, in addition to the already present
`wp_lazy_loading_enabled` filter, developers can now opt out of lazy-
loading template images via `wp_get_attachment_image()` by passing a
`loading` attribute with boolean value `false`. This can be used e.g. by
theme developers on images which are very likely to be in the initial
viewport.
This changeset also improves related test coverage.
Props adamsilverstein, azaozz, joemcgill, johnbillion.
See #50425, #44427.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44427#comment:110>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list