Shows how to lazy load images in the browser with the Intersection Observer API, using rootMargin so each image loads just before it scrolls into view. It is part of a series on Intersection Observer and assumes familiarity with HTML and JavaScript.
What you’ll learn
✓Lazy load images with the Intersection Observer API
✓Use rootMargin to load images before they enter the screen