This Web Component is a dead simple component to lazy load images which was developed for the project DeckDeckGo.
It leverages the IntersectionObserver API to lazy load images and also allows you to trigger "manually" their loading.
To get started with this Web Component, have a look to its documentation.
To develop and run this Web Component locally, proceed as following:
git clone https://github.com/deckgo/deckdeckgo
cd deckdeckgo/webcomponents/lazy-img
npm install
npm run start
MIT © David Dal Busco and Nicolas Mattia