perf(storefront): route brand logos through cdn-cgi image resizing#286
What happened
Brand logos ship as raw files while product photos already use Cloudflare image resizing. Measured on the homepage:
cdn.darjs.dev/brands/herbamama.webp= 205KB, rendered roughly 44px tall in a logo stripdouble-wood-supplements.webp= 62KB,doctors-best.webp= 29KB,nordic-naturals.webp= 15KB- The same Herbamama file through our own transform returns 1.4KB:
https://cdn.darjs.dev/cdn-cgi/image/width=96,quality=75,format=auto/https://cdn.darjs.dev/brands/herbamama.webp
That is about 250KB+ of avoidable transfer on the homepage alone, plus wherever else logos render (sidebar, footer, product pages).
Plan
Route every brand logo reference through /cdn-cgi/image/width=<slot*2>,quality=75,format=auto/ like product images already do. Pick widths from the actual render slots.
Acceptance criteria
- No brand logo transfers more than ~10KB on the homepage
- Total homepage image transfer drops by at least 200KB
- Logos stay crisp on 2x screens