Prompt
I'm building a storefront and need fast image delivery from a CDN
Latest observation
Nov 2, 2026
OpenAI APIWeb search: off
For a storefront, the usual winning setup is:
-
Store originals in object storage
- e.g. S3, Cloudflare R2, Google Cloud Storage, Azure Blob.
-
Put a CDN in front
- e.g. CloudFront, Cloudflare CDN, Fastly, Akamai.
- Serve all product images through the CDN URL, not directly from origin.
-
Use image resizing/transformation at the edge or via an image service
- Generate responsive sizes like
thumb,small,medium,large. - Prefer modern formats like WebP and AVIF when supported.
- Generate responsive sizes like
-
Cache aggressively
- Set long cache headers for versioned assets.
- Use immutable filenames or query-versioning, e.g.
shirt-red.abc123.webp.
-
Optimize delivery
- Lazy-load below-the-fold images.
- Use
srcset/sizesso browsers download the right size. - Compress images and strip metadata.
-
Keep origin cheap and reliable
- Make the CDN the primary delivery path.
- Use cache invalidation only when needed.
If you want, I can recommend a concrete stack based on your platform:
- Shopify-like SaaS
- Custom app on AWS
- Cloudflare-based setup
- WordPress/WooCommerce
- Next.js / React storefront