Skip to main content
Wright Websites

lazy-pulse

audit lazy-loading mistakes

Lazy-loading audit for static sites: below-the-fold images and iframes missing loading=lazy, and LCP candidates (hero images, first images) wrongly lazy-loaded or deprioritised.

  • 15/week on npm
  • 2★
  • MIT
  • v1.0.0
  • Web Performance
npx lazy-pulse

Read the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)

lazy-pulse

From the README

Native loading="lazy" is one attribute, and it is easy to get wrong in both directions: galleries and embeds below the fold download eagerly, while a template applies loading="lazy" (or a data-src library) to the hero image and pushes back Largest Contentful Paint. lazy-pulse reads your built HTML, picks the likely LCP image on each page, and checks every image and iframe against where it sits in the document.

npx lazy-pulse dist
npx lazy-pulse _site --fold-images 2
npx lazy-pulse public --fail-on medium -f sarif > lazy.sarif

Related packages

Web Performance