[wp-trac] [WordPress Trac] #44427: Introduce lazy-loading API for media and other elements
WordPress Trac
noreply at wordpress.org
Sun Jun 2 19:20:42 UTC 2019
#44427: Introduce lazy-loading API for media and other elements
------------------------------------------+------------------------------
Reporter: mor10 | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: performance
------------------------------------------+------------------------------
Comment (by pcfreak30):
While I like this idea, I think it should be pointed out that we should
not re-invent the wheel with a lazyload library. Not sure if that was
anyone thought process, but seemed like it. One that I have seen google
link to (forgot where) and as a link on pagespeed I think, is
https://github.com/aFarkas/lazysizes.
They also have an `IntersectionObserver` version at
https://github.com/aFarkas/lazysizes/blob/gh-pages/src/lazysizes-
intersection.js which uses no scroll timers. The code uses no jquery and
also makes changes with requestAnimationFrame with a simplistic queue
system for performance vs setTimeout. Among it is a folder with like 20
plugins, thus can be used for custom ones.
Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44427#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list