finds.dev← search

// the find

notwaldorf/lazy-image

★ 213 · HTML · MIT · updated Feb 2018

A custom image element that lets you load resources on demand

A Web Components custom element from 2018 that defers image loading until an `active` attribute is set, either manually or via IntersectionObserver. It predates the native `loading="lazy"` attribute on `<img>`, which is now supported across all modern browsers. Mostly a historical artifact at this point.

The IntersectionObserver example is clean and correct — unobserving after activation is exactly right. The API surface is minimal: three attributes, no config objects, no callbacks required. The demo shows a legitimate use case (click-to-reveal) that native lazy loading still doesn't cover directly.

Bower-only install in 2026 is a dealbreaker — npm support was listed as 'coming soon' in 2018 and never arrived. Abandoned since February 2018 with 7 forks total, so there's no community to fill the gap. The core problem it solved (`loading="lazy"`) is now a one-attribute fix in HTML, making this redundant for 95% of use cases. No test suite, no TypeScript types, no ES module export.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →