# tuupola/lazyload

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tuupola-lazyload).**

8,727 stars · 2,172 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/tuupola/lazyload
- Homepage: https://appelsiini.net/projects/lazyload/
- awesome-repositories: https://awesome-repositories.com/repository/tuupola-lazyload.md

## Description

Lazyload is a JavaScript plugin that defers the loading of images until they scroll into the viewport, using the browser's Intersection Observer API to detect visibility. It is designed to speed up initial page load and save bandwidth by delaying off-screen images, and includes a jQuery-compatible wrapper for drop-in integration with existing jQuery code.

The plugin distinguishes itself through support for responsive images, loading different sources based on screen size, and a blur-up placeholder effect that shows a low-resolution image that transitions into the sharp version once fully loaded. It also provides instance lifecycle management, allowing developers to create, destroy, or force-load all images, and supports inline placeholders as data URIs to reduce network requests.

Additional capabilities include event-driven loading triggers on scroll, resize, or orientation changes, and the ability to load and destroy the instance in a single operation. The plugin is configured through custom data attributes that specify image source URLs, keeping the standard `src` attribute empty to prevent early loading.

## Tags

### Web Development

- [Image Lazy Loading](https://awesome-repositories.com/f/web-development/lazy-loading-libraries/image-lazy-loading.md) — Delays the loading of off-screen images until they scroll into the viewport to speed up initial page load and save bandwidth.
- [Responsive Image Loaders](https://awesome-repositories.com/f/web-development/lazy-loading-libraries/image-lazy-loading/responsive-image-loaders.md) — Loads different image sources based on screen size using a set of alternative URLs.
- [Viewport Observers](https://awesome-repositories.com/f/web-development/viewport-observers.md) — Uses the Intersection Observer API to detect when elements enter the viewport and trigger loading.
- [jQuery-Compatible Libraries](https://awesome-repositories.com/f/web-development/jquery-compatible-libraries.md) — Provides a jQuery-compatible wrapper for lazy loading images with familiar syntax.
- [jQuery Plugins](https://awesome-repositories.com/f/web-development/jquery-plugins.md) — Wraps the vanilla JavaScript functionality in a jQuery-compatible interface for drop-in integration.
- [Event-Driven Loading Triggers](https://awesome-repositories.com/f/web-development/lazy-loading-libraries/image-lazy-loading/event-driven-loading-triggers.md) — Provides event-driven loading triggers on scroll, resize, or orientation changes.
- [Placeholder-First Loading](https://awesome-repositories.com/f/web-development/lazy-loading-libraries/image-lazy-loading/placeholder-first-loading.md) — Shows a low-resolution placeholder that blurs into the sharp image once fully loaded. ([source](http://www.appelsiini.net/projects/lazyload))
- [Blur-Up Transitions](https://awesome-repositories.com/f/web-development/lazy-loading-libraries/image-lazy-loading/placeholder-first-loading/blur-up-transitions.md) — Shows a low-resolution placeholder that blurs into the sharp image once fully loaded for a smoother visual transition. ([source](https://appelsiini.net/projects/lazyload/))

### User Interface & Experience

- [Intersection Observer Image Loaders](https://awesome-repositories.com/f/user-interface-experience/ui-components/image-view-components/image-thumbnails/remote-image-loaders/image-loader-configurations/intersection-observer-image-loaders.md) — Uses the Intersection Observer API to detect when images enter the viewport and trigger loading.
- [Instance Lifecycle Management](https://awesome-repositories.com/f/user-interface-experience/calendars/instance-lifecycle-management.md) — Provides methods to create, destroy, and force-load all images, managing the observer and event listeners.
- [Preloading Placeholders](https://awesome-repositories.com/f/user-interface-experience/image-placeholders/preloading-placeholders.md) — Loads a low-resolution placeholder image first, then swaps it with the full-resolution image once triggered.
