/placeholder/*0.5 credits per call · 1-year immutable cachePlaceholders.
BlurHash and dominant-color tiles served as real images. Pass a hash or a source — get a sub-kilobyte placeholder back, immutably cached for a year.
# Decode a BlurHash · 1200×675 tile
curl 'https://demo.imgapis.com/placeholder/blurhash?blurhash=LEHV6nWB2yk8pyo0adR*.7kCMdnj&w=250&h=250'GET /placeholder/blurhashRender a blurred low-res preview while the real image streams in — pass the hash directly or derive it from a URL.
blurhashone of blurhash / src—DefaultA BlurHash string to decode.
srcone of blurhash / src—DefaultSource image. Full URL, source-alias form (<source-name>/<path>), or path-sugar /placeholder/blurhash/<source-name>/<path>. Server derives the BlurHash from it.
wOptional—DefaultOutput width in pixels. Required with blurhash; optional with src (falls back to intrinsic).
hOptional—DefaultOutput height in pixels.
fitOptionalcontainDefaultWith src, defaults to contain. Pass cover to force exact w × h.
containcoverdprOptional1DefaultDevice-pixel-ratio multiplier.
punchOptional1DefaultBlurHash decoder contrast boost.
qualityOptional80DefaultEncoder quality. Applies to lossy formats.
formatOptional—DefaultOutput format. Accept-negotiated when omitted (avif > webp > png).
avifjpegjpgnocompresspngwebpGET /placeholder/colorDrop a solid-color tile (or auto-color from an image) for instant LQIP and offline-friendly skeletons.
colorone of color / src—DefaultHex color. Accepts #rgb, #rgba, #rrggbb, #rrggbbaa. Leading # is optional.
srcone of color / src—DefaultSource image. Full URL, source-alias form (<source-name>/<path>), or path-sugar /placeholder/color/<source-name>/<path>. Server extracts the dominant color from it.
wOptional—DefaultOutput width in pixels. Required with color; optional with src.
hOptional—DefaultOutput height in pixels.
fitOptionalcontainDefaultWith src, defaults to contain. Pass cover to force exact w × h.
containcoverdprOptional1DefaultDevice-pixel-ratio multiplier.
qualityOptional80DefaultEncoder quality. Applies to lossy formats.
formatOptional—DefaultOutput format. Accept-negotiated when omitted (avif > webp > png).
avifjpegjpgnocompresspngwebpRender the placeholder before the bytes arrive.
LCP-safe hero placeholders
Sub-2 kB PNG fills the hero box before the AVIF lands. Largest-contentful-paint stays green without shipping a BlurHash decoder to every visitor.
Offline-friendly skeletons
Solid-color tiles cache in your service worker; the full image swaps in when network comes back. Offline-friendly UI without a separate asset pipeline.
List / grid lazy-load
Color tile for every card in the feed; swap in the real image on IntersectionObserver. Hundreds of images per scroll, one URL grammar.
Dominant-color empty states
/placeholder/color?src=… extracts the dominant color AND serves the tile in one URL. No /info round-trip, no client-side color math.