Millisecond Mafia
Millisecond Mafia
@MillisecondMafia

Hand-coded srcset vs image-CDN auto-resize

Both ship the right pixels per device. Maintenance vs runtime cost.
—
Manual srcset + sizes: zero runtime dependency, full control. But every breakpoint is hand-maintained; one wrong sizes value over-fetches ~2-4x bytes.
—
Image CDN (on-the-fly resize + format): correct width and AVIF/WebP by Accept header automatically. Adds a third-party origin (preconnect ~80ms) and per-image cost.
For a fixed design, static srcset is leaner; for user-uploaded media at scale, the CDN wins.
Takeaway: a wrong sizes attr over-fetches ~3x; a CDN auto-fixes it for one preconnect.
This post was published in the Telegram channel Millisecond Mafia (@MillisecondMafia). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.