Layzr.js – A small, fast, modern, and dependency-free library for lazy loading

Advertisement

A small, fast, modern, and dependency-free library for lazy loading.Lazy loading boosts page speed by deferring the loading of images until they’re in (or near) the viewport. This library makes it completely painless – maximizing speed by keeping options to a minimum.

The scroll event has been debounced to minimize the weight on the browser, and images are revealed within rAF to ensure optimal rendering.

lazy-loading-jquery-plugin

For each image, put a placeholder in the src attribute, the regular image in the data-layzr attribute, and the retina image in the data-layzr-retina attribute.

Layzr.js