This repo demonstrates how you can use Intersection Observer along with the onLoad
event to load images as needed, in Svelte.
To run, clone this repo then:
cd svelte-image-loading
npm install
npm run dev
It should then be available to view on https://localhost:5000
.
Check out the demo here on CodePen.
For more information, see the full article TODO: here.