# RevillWeb/img-2

Replace <img /> elements with <img-2> to automatically pre-cache images and improve page performance.

Repository: https://github.com/RevillWeb/img-2
Canonical: https://ross.abutalabs.com/products/img-2
Language: HTML
License: MIT
License Family: permissive
Last push: 2018-05-22T16:11:30+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3188, "days_push": 3025, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1881, forks 63 (observed 2026-08-28T04:05:48.646939+00:00)

## What it is
Img2 is a web component library that replaces standard <img> elements with an <img-2> custom element to pre-cache images off the main thread and lazy load them as they enter the viewport. It displays blurred low-resolution previews while full-size images load, improving perceived page performance.

## Use cases
- lazy load images as they scroll into view
- pre-cache images with a web worker to avoid jank
- show blurred placeholder previews while images load
- improve initial page load performance with many images
- replace img tags with a drop-in web component

## When to choose
- you want a simple drop-in replacement for <img> with lazy loading and pre-caching
- your page displays many high-quality images and suffers from slow initial load or jank
- you want blurred placeholder previews without writing custom JavaScript

## When to avoid
- you need an actively maintained solution - the project has had no releases since 2018
- you already use a modern framework with built-in image optimization or a maintained lazy-loading library
- you need advanced features like responsive srcset or art direction

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, ui-components, caching
- domain: web-development, frontend, performance
- platform: browser
- tags: web-components, lazy-loading, image-optimization, custom-elements, web-worker, progressive-image-loading, web-server

## Member repositories
- RevillWeb/img-2 (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.646939+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:57.856559+00:00, confidence not recorded.
  - readme: https://github.com/RevillWeb/img-2 (fetched 2026-08-28T04:05:48.646939+00:00, sha 60ff5dcd2569)
- Data as of 2026-08-30T08:39:29.467469+00:00.
