[wp-trac] [WordPress Trac] #44427: Introduce lazy-loading API for media and other elements
WordPress Trac
noreply at wordpress.org
Mon Jul 27 20:44:44 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 has-dev-note | performance
-------------------------------------------------+-------------------------
Comment (by flixos90):
> Replying to [comment:118 johnstonphilip]:
> > Are there any proposed limits on what this function might do...
>
> This function (and its predecessor) have been used only for back-fills
of new, significant HTML features to existing posts/content. Don't think
that will change.
To add to that, this function is more generic than its predecessor to
allow for the existing and future cases where we'll need to back-fill
attributes to happen in a more performant way (e.g. combined regex). If a
plugin would like fine-grained control (e.g. lazy-load images but not add
responsive attributes), it should preferably not unhook the entire
function, but use the more specific filters available.
If a plugin has its own special type of content that it would like to
receive similar treatment for, that's probably the only case that this
function should be manually called.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44427#comment:120>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list