amphtml
amphtml copied to clipboard
feat: Added <amp-blurhash> component to render BlurHash placeholders for AMP pages
Adds a new AMP component
Key features:
- Renders a valid BlurHash string using canvas.
- Custom element layout support (
fixed,responsive, etc.). - Lightweight: ~150 LOC, zero production dependencies.
- Fully unit-tested with coverage.
- Includes example page (
examples/amp-blurhash.html) for easy testing. - Validator rule added for runtime support.
This component is ideal for image-heavy AMP pages where placeholder polish matters.