A stateless image CDN that optionally transforms images with Sharp and serves them through Cloudflare's edge cache. It replaces the per-client DNS image hosting pattern with a single unified endpoint.
# Original image (pass-through, no transforms)https://agr.media/example.com/images/logo/hero.jpg# Resize to 400px widehttps://agr.media/example.com/images/w_400/logo/hero.jpg# Resize + convert to WebPhttps://agr.media/example.com/images/w_400,f_webp/logo/hero.jpg# Resize + quality adjustmenthttps://agr.media/example.com/images/w_800,q_60/logo/hero.jpg
ETag is based on file size + mtime — revalidation works when source files change
f_auto picks AVIF if the browser accepts it, else WebP, else JPEG for a JPEG image and PNG for any other (so transparency is kept). Only f_auto replies carry Vary: Accept, and the edge keeps one copy per format: a Cloudflare cache rule for the agr.media host normalizes Accept to image/avif / image/webp and adds it to the cache key (Cloudflare ignores Vary without one, so the first visitor's format would otherwise be served to everyone)
No immutable — images may be replaced at the same path
No origin disk cache — Cloudflare edge is the only cache layer