# desandro/imagesloaded

**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/desandro-imagesloaded).**

8,883 stars · 1,127 forks · JavaScript · mit

## Links

- GitHub: https://github.com/desandro/imagesloaded
- Homepage: https://imagesloaded.desandro.com
- awesome-repositories: https://awesome-repositories.com/repository/desandro-imagesloaded.md

## Description

imagesloaded is a JavaScript image loading library used to detect when images and background images have finished loading or failed within a web page. It functions as a frontend asset loader and DOM image event monitor that synchronizes user interface updates with the actual completion of image downloads in the browser.

The library provides monitoring systems to track the loading status of individual images, group containers, and background assets. It coordinates the appearance of a web page to ensure content is not displayed until required assets are ready, which helps manage the loading sequence of visual assets and prevent layout shifts.

Capabilities include triggering callbacks based on total success, failure, or incremental progress. The tool supports a variety of resolution methods, including event listeners, polling for background images, and promises for asynchronous state resolution.

## Tags

### Web Development

- [Image Load Tracking](https://awesome-repositories.com/f/web-development/image-load-tracking.md) — Detects when images and background images have finished loading or failed within a web page. ([source](https://imagesloaded.desandro.com))
- [Container Load Monitoring](https://awesome-repositories.com/f/web-development/container-load-monitoring.md) — Tracks all images within a specific container and triggers callbacks once all assets have finished loading or failed. ([source](https://cdn.jsdelivr.net/gh/desandro/imagesloaded@master/README.md))
- [DOM Image Event Monitoring](https://awesome-repositories.com/f/web-development/dom-image-event-monitoring.md) — Triggers callbacks when specific images or groups of assets complete their loading process.
- [Frontend Asset Synchronization](https://awesome-repositories.com/f/web-development/frontend-asset-synchronization.md) — Tracks when images and background assets finish loading to prevent layout shifts and trigger visual updates.
- [Image Load Event Monitors](https://awesome-repositories.com/f/web-development/image-load-event-monitors.md) — A mechanism to trigger specific events every time a single image finishes loading to provide the status of that individual asset. ([source](https://cdn.jsdelivr.net/gh/desandro/imagesloaded@master/README.md))
- [Image Loading Libraries](https://awesome-repositories.com/f/web-development/image-loading-libraries.md) — A JavaScript library for detecting when images and background images have finished loading or failed.
- [Promise-Based State Resolution](https://awesome-repositories.com/f/web-development/asynchronous-state-managers/promise-based-state-resolution.md) — Wraps image event listeners in promises to allow asynchronous awaiting of the final loading state.
- [Initial Page Load Optimizations](https://awesome-repositories.com/f/web-development/performance-optimizations/initial-page-load-optimizations.md) — Manages the loading sequence of visual assets to ensure a smooth user experience during initial page load.
- [Asset Loading Counters](https://awesome-repositories.com/f/web-development/reactive-networking/progress-tracking/asset-loading-counters.md) — Maintains an internal counter of loaded versus total images to determine when the entire set is finished.

### Development Tools & Productivity

- [Asset Loaders](https://awesome-repositories.com/f/development-tools-productivity/asset-loaders.md) — Synchronizes user interface updates with the actual completion of image downloads in the browser.

### User Interface & Experience

- [DOM Event Listeners](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/interaction-and-event-handling/event-handling-architectures/event-handling/dom-event-listeners.md) — Listens for native browser load and error events on image elements to track completion status.
- [UI Loading Coordination](https://awesome-repositories.com/f/user-interface-experience/ui-loading-coordination.md) — Coordinates the appearance of a web page so that content is not displayed until all images are ready.
- [Dynamic UI Synchronizers](https://awesome-repositories.com/f/user-interface-experience/dynamic-ui-querying/dynamic-ui-synchronizers.md) — Executes JavaScript functions or animations only after all required images in a container have fully loaded.
- [Load State Polling](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/styling-architectures/background-image-utilities/load-state-polling.md) — Checks the completion of CSS background images by polling the complete property of underlying image objects.

### Software Engineering & Architecture

- [Event-Driven Callbacks](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-callbacks.md) — Provides callbacks that trigger immediately after specific images or entire collections finish loading.
