Killing 14 image variants per photo at the edge
A fashion marketplace in Melbourne was uploading 14 hand-cut sizes per product photo to origin — 612KB average page weight, and designers hated the workflow.
We moved resizing to the edge in five steps:
— Kept one high-res master per image at origin
— Added edge image-resizing: width and format negotiated from the URL and Accept header
— Served AVIF to Chrome, WebP to Safari, JPEG fallback — all from one source file
— Set the resized variants to cache at the edge for 30 days, keyed by width+format
— Stripped the 14-variant upload pipeline entirely
First load in Sydney dropped page weight to 198KB. AVIF cut photo bytes 41% versus the old JPEGs. Designers upload once. Watch the cache key — forget to include format in it and Safari users get served AVIF they can't decode.
The number that mattered: 414KB shaved off every product page, fully automatic.
Edge of Glory
@EdgeOfGloryCDN
Killing 14 image variants per photo at the edge
Этот пост опубликован в Telegram-канале Edge of Glory. Подписаться можно по ссылке: @EdgeOfGloryCDN.