apoorvsaxena/lozad.js

🔥 Highly performant, light ~1kb and configurable lazy loader in pure JS with no dependencies for responsive images, iframes and more

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 51 minutes ago
Added to GitGenius on September 8th, 2026
Created on August 28th, 2017
Open Issues & Pull Requests: 68 (+0)
GitHub issues: Enabled
Number of forks: 435
Total Stargazers: 7,494 (+0)
Total Subscribers: 110 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Lozad.js is a lazy-loading library that defers the loading of images, iframes, videos, and other elements until they enter the viewport using the Intersection Observer API.

The library solves the problem of unnecessary resource consumption on page load by deferring media loading until needed. It uses the Intersection Observer API to detect when elements become visible and the Mutation Observer API to handle dynamically added content. The approach requires no external dependencies and maintains a minimal footprint while supporting responsive images, background images, picture elements, and low-quality image placeholders.

Developers should choose this tool for projects where performance matters and bundle size is a concern. It suits any web application serving images or embedded media, from simple blogs to complex single-page applications. The library handles standard img tags, picture elements, iframes, videos, audios, and background images, including multiple background images on a single element. It also supports lazy loading of dynamically injected DOM elements and will reload when relevant attributes change.

The project maintains active engagement with bug fixes and feature improvements across multiple releases. Development includes regular updates to address edge cases and browser compatibility issues. The codebase receives contributions that expand supported element types and improve the robustness of the lazy-loading mechanism. The project demonstrates responsiveness to user feedback through issue resolution and documentation updates.