lazysizes is a fast (jank-free), SEO-friendly and self-initializing lazyloader for images (including responsive images picture
/srcset
), iframes, scripts/widgets and much more. It also prioritizes resources by differentiating between crucial in view and near view elements to make perceived performance even faster.
The plugin can be configured with the following options. Check out the official repository for documentation and examples .
autosizesClass
customMedia
The customMedia
option object is an alias map for different media queries. It can be used to separate/centralize your multiple specific media queries implementation (layout) from the source[media]
attribute (content/structure) by creating labeled media queries.
Plugins Review the
documentation before enabling any of the plugins. Enabled plugins may offer additional configuration which you can override via
window.lazySizesConfig