# verlok/vanilla-lazyload

LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.

Repository: https://github.com/verlok/vanilla-lazyload
Canonical: https://ross.abutalabs.com/products/vanilla-lazyload
Homepage: https://www.andreaverlicchi.eu/vanilla-lazyload/
Language: JavaScript
License: MIT
License Family: permissive
Topics: lazyload-images, lazy-loading, responsive-images, intersectionobserver, webp, images, videos, iframes, lazyload, lazyload-iframes, lazyload-videos, lazyload-script, picture-tag, picture, srcset, srcset-sizes, lazy-sizes, vanilla-javascript, vanilla-js, hacktoberfest
Last push: 2026-06-22T20:24:15+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 88, release rhythm 8, longevity 100
- inputs: {"age_days": 4314, "days_push": 72, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7855, forks 673 (observed 2026-08-28T04:10:07.570358+00:00)

## What it is
A lightweight (2.4 kB) vanilla JavaScript library that speeds up websites by deferring the loading of below-the-fold images, backgrounds, videos, iframes, and scripts until they enter the viewport. It uses the IntersectionObserver API, supports responsive images (srcset, picture, WebP), and can leverage native lazy loading.

## Use cases
- lazy load images as user scrolls
- defer loading of below-the-fold videos and iframes
- lazy load responsive images with srcset and picture
- serve webp images with automatic format selection
- improve page speed by deferring offscreen content
- add low-quality image placeholders that swap on scroll
- lazy load background images and scripts

## When to choose
- you need a tiny, dependency-free lazy loading script for any website
- you need lazy loading with responsive image and WebP support
- you want a hybrid approach with native lazy loading fallback
- you support older browsers without native lazy loading

## When to avoid
- all your target browsers support native loading='lazy' and you don't need placeholders or advanced control
- you're using a framework with built-in lazy loading (e.g., Next.js images)
- you need lazy loading for non-DOM content like data or routes

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, developer-tools
- domain: web-development, frontend, performance
- platform: browser
- tags: lazy-loading, intersection-observer, responsive-images, vanilla-js, web-performance, srcset, webp, no-dependencies, javascript, nodejs

## Member repositories
- verlok/vanilla-lazyload (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:07.570358+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:33:48.259087+00:00, confidence not recorded.
  - readme: https://github.com/verlok/vanilla-lazyload (fetched 2026-08-28T04:10:07.570358+00:00, sha 147b2552c0ba)
  - homepage: https://www.andreaverlicchi.eu/vanilla-lazyload/ (fetched 2026-08-29T08:30:40.405927+00:00, sha f1091258bf1b)
  - site_page: https://www.andreaverlicchi.eu/en/about (fetched 2026-08-29T08:30:40.415182+00:00, sha ce1cc1b78aed)
  - registry_npm: https://registry.npmjs.org/vanilla-lazyload (fetched 2026-08-29T08:30:40.417097+00:00, sha d581e930509f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
