How Zenith Walls served 70,000+ 4K wallpapers on Next.js 15 without breaking the edge
Zenith Walls, a wallpaper platform offering over 70,000 high-resolution 4K and 8K images, faced severe performance challenges when scaling its Next.js 15 infrastructure across multiple CDNs and Cloudflare R2 storage. Key issues included browser tab crashes from parallel 4K bitmap decoding, CDN 403 errors caused by missing Referer headers in Next.js image optimization requests, and edge function CPU timeouts when attempting server-side image resizing. To address these, the team built a strict URL normalization pipeline that routes every image through a custom proxy endpoint before it reaches the UI, allowing controlled header injection, source routing, and edge caching. This architecture separated display-optimized image delivery from full-resolution downloads, eliminating layout shifts and improving Core Web Vitals like LCP. The approach avoided expensive infrastructure scaling by handling transformation logic deterministically at the proxy layer rather than on raw edge functions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in