A high-performance, SEO-friendly lazy loader for images, iframes, and more that detects visibility changes automatically.
lazysizes is a JavaScript lazy loader for images, iframes, and other resources that automatically detects when elements become visible through scrolling, CSS, or JavaScript interactions. It solves the problem of improving page load performance and user experience by deferring the loading of off-screen assets until they are needed, while maintaining SEO compatibility and supporting responsive images.
Frontend developers and web performance engineers building content-heavy websites or web applications who need a robust, zero-configuration lazy loading solution that works with modern frameworks and responsive image standards.
Developers choose lazysizes for its automatic detection of visibility changes across any web environment, its built-in responsive image support with automatic `sizes` calculation, and its intelligent prefetching that optimizes perceived performance without compromising SEO.
High performance and SEO friendly lazy loader for images (responsive and normal), iframes and more, that detects any visibility changes triggered through user interaction, CSS or JavaScript without configuration.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Detects any visibility changes automatically, including scroll, CSS animations, and JS behaviors like carousels, without configuration, as highlighted in the README's self-initializing design.
Built-in support for `picture` and `srcset` with automatic `sizes` calculation and media query aliasing, separating layout from HTML for easier responsive image implementation.
Prefetches near-view elements only during browser idle time, improving perceived performance without blocking critical loads, using configurable `expand` and `expFactor` options.
Reveals all images instantly for non-scrolling user agents like Googlebot, ensuring search engines can index content properly without hiding assets, as emphasized in the SEO-friendly feature.
Offers optional plugins for effects like blur-up, art direction, and polyfills (e.g., for `object-fit`), allowing customization without core changes, as detailed in the plugins section.
Requires changing standard `src` attributes to `data-src` and adding `lazyload` class, which can be cumbersome in frameworks or legacy code that don't natively support this pattern.
The `data-sizes='auto'` feature depends on calculable image dimensions and may fail with `width: auto` or complex parent containers, as noted in the README's warning about requiring `display: block; width: 100%` for accuracy.
No lazy loading occurs if JavaScript is disabled; while a noscript pattern is suggested, it adds complexity for full fallback support and isn't seamless out-of-the-box.
Advanced features like custom media queries or plugin integration require understanding the JS API and options, which can be a steep learning curve beyond basic drop-in use.