Skip to content
r.

img-2

RevillWeb/img-2 · Public GitHub repository

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

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

img-2 live demo screenshot
Captured from the live demo · 2026-11-03

About this project

Author-written excerpt from the project README.

Replace elements with to automatically pre-cache images and improve page performance. Displaying even a small number of high-quality images on a web page can be difficult to do without causing jank or slowing down the initial load of the page. This is why clever developers employ techniques with JavaScript to pre-cache images and lazy load them as they become visible on the user's screen.

Img2 makes this super easy, just swap out your elements with and let it do the work for you.

Requirements and intended audience

Replace elements with to automatically pre-cache images and improve page performance. Displaying even a small number of high-quality images on a web page can be difficult to do without causing jank or slowing down the initial load of the page. This is why clever developers employ techniques with JavaScript to pre-cache images and lazy load them as they become visible on the user's screen.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-10-27. Source: https://github.com/RevillWeb/img-2/blob/master/README.md

Recorded maintenance information

Last recorded source update: 2018-05-22. A published release has not been recorded. These dates do not guarantee ongoing maintenance.

Technologies
HTML
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-20. This does not test every feature.

Browse related categories