[wp-trac] [WordPress Trac] #50425: Do not lazy-load images which are very likely to be in the initial viewport
WordPress Trac
noreply at wordpress.org
Thu Jul 2 02:01:43 UTC 2020
#50425: Do not lazy-load images which are very likely to be in the initial viewport
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.5
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev- | Focuses:
note |
-------------------------------------------------+-------------------------
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/50425#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list