TLDR Web Dev · QUICK LINKS

LAZY LOAD BACKGROUND IMAGES WITH THE INTERSECTIONOBSERVER API

debugbear.com12 min read

Summary from the TLDR Web Dev newsletter

Lazy loading of background images can be done using the IntersectionObserver API, which monitors when offscreen images are about to become visible in the viewport and then loads them.