My blog got popular, and my bandwidth exploded to ~300GB in just 10 days
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A developer discovered their Astro blog consumed 249GB of bandwidth in 10 days after a traffic spike. The culprit: 52 uncompressed DSLR photos (258MB) in the public/ folder, missing cache headers, and a hero video with preload='auto'. Six fixes in 30 minutes reduced deployed assets by 68%: compressing images with sips, migrating carousel images to Astro's Image component for automatic WebP conversion, adding Cache-Control headers for images/video/fonts, enabling Netlify CDN edge caching with stale-while-revalidate, changing video preload to 'metadata', and deleting unused video files. The Astro Image component now handles automatic compression, WebP conversion, content-hashed filenames, and lazy loading at build time.
Table of contents
The crime scene 🔗Why public/ is a trap 🔗No caching, anywhere 🔗The hero video situation 🔗The fix 🔗The results 🔗What I should still do 🔗What I didn’t do 🔗Check yours 🔗Sort: