Overview of Plaiceholder LQIP strategies
mainPlaiceholder is a suite of server-side functions designed to create Low Quality Image Placeholders (LQIP). It provides multiple strategies so you can choose the one that best fits your performance and aesthetic requirements:
- Color: A simple solid color placeholder.
- CSS: Generates a CSS-based placeholder (~600B when rendered).
- SVG: Generates an SVG placeholder (~1.2kB when rendered in HTML).
- Base64: Generates a Base64 encoded image placeholder (~300B asset size).
Strategy Tradeoffs
| Strategy | Pros | Cons |
|---|---|---|
| Color | Extremely lightweight | Plain; not visually engaging |
| CSS | Lightweight | Won't maintain aspect ratio for images using object-fit |
| SVG | Visually smooth | Does not currently leverage SVG filter primitives (like feGaussianBlur) |
| Base64 | Small asset size | Can appear drab; even with Plaiceholder's internal saturation boost, colors may not look ideal |