A lightweight (~1kb) pure JavaScript lazy loader for images, iframes, and other elements using IntersectionObserver API.
Lozad.js is a lightweight lazy loading library that delays the loading of images, iframes, and other media until they are about to enter the viewport. It solves performance issues by replacing scroll-event-based lazy loaders with the efficient IntersectionObserver API, reducing layout recalculations and improving page speed.
Frontend developers and web performance engineers building content-heavy websites who need to optimize loading times without adding library bloat.
Developers choose Lozad.js for its zero dependencies, tiny footprint (~1kb), and modern API support, offering a reliable and configurable lazy loading solution that outperforms traditional scroll-based libraries.
🔥 Highly performant, light ~1kb and configurable lazy loader in pure JS with no dependencies for responsive images, iframes and more
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At roughly 1KB gzipped with no external dependencies, it minimizes bundle size and avoids compatibility issues, as highlighted in the README's badge.
Uses IntersectionObserver to eliminate scroll-event listeners and layout recalculations, directly addressing performance bottlenecks for faster page loads.
Lazy loads images, iframes, videos, audios, and background images with srcset and picture tags, covering most common web media needs.
Automatically observes new DOM elements via MutationObserver, making it seamless for single-page applications or AJAX-loaded content.
Relies on IntersectionObserver, unsupported in IE and older browsers, requiring additional polyfills that increase complexity and bundle size.
Does not provide automatic degradation for non-JS environments; developers must manually implement noscript tags or server-side alternatives.
Missing built-in mechanisms for failed loads or complex scenarios like priority queuing, forcing custom code for robustness.