9 File Size Mistakes That Slow Down Your Website

Why File Size Still Kills Websites in 2024

You can have the sharpest design, the cleanest code, and a rock-solid hosting plan — and your site will still feel like it's loading through dial-up if your assets are bloated. The frustrating part? Most of these file size mistakes are completely invisible until you run a speed test and see a 9-second load time staring back at you.

Here are the nine most common oversized-asset blunders I see developers and designers repeat, plus exactly how to fix each one.

1. Uploading Hero Images Straight From a Camera or Stock Site

A raw DSLR photo or a freshly downloaded stock image can easily be 8–25 MB. Drop that onto your homepage hero section and you've already lost half your visitors on mobile before the page even finishes painting.

The fix: Resize the image to the actual display dimensions first — if your hero is 1440px wide, there's zero reason to serve a 5000px original. Then compress it with a tool like Squoosh, ImageOptim, or TinyPNG. Target under 200 KB for hero images; 100 KB is even better. If you can serve WebP (with a JPEG fallback), do it — WebP typically cuts another 25–35% off your file size versus JPEG at the same visual quality.

2. Serving the Same Image Size to Every Device

A 1400px-wide banner looks great on a 27-inch monitor. On a 375px-wide phone screen, you're forcing the browser to download three to four times more data than it actually needs to render that image. Multiply that across ten images on a page and you're burning megabytes for no reason.

The fix: Use the HTML srcset attribute or a responsive image CDN like Cloudinary or Imgix. Define breakpoint-specific image versions — 400w, 800w, 1200w — and let the browser pick the right one. Most modern page builders support this natively; you just have to turn it on.

3. Embedding Video Files Directly Into Your Site

Uploading an MP4 background video or a product demo directly to your web server is one of the fastest ways to destroy your Time to First Byte. A 30-second video at decent quality can easily hit 80–150 MB. Every visitor streaming that file hammers your server bandwidth and their connection simultaneously.

The fix: Host videos on YouTube, Vimeo, or Bunny.net and embed them. For background videos, keep them under 5 MB by dropping the resolution to 720p, cutting the frame rate to 24fps, and using a service like HandBrake with H.264 encoding. Alternatively, replace autoplay video backgrounds with a looping WebM — they compress far more efficiently.

4. Loading Entire Icon Libraries When You Need Six Icons

Loading the full Font Awesome CSS file (around 70 KB minified, plus web fonts) to display a handful of social media icons is overkill of the highest order. Yet it's one of the most common patterns I see in WordPress themes and custom builds alike.

The fix: Inline only the SVG icons you actually use, or generate a custom icon subset using a tool like IcoMoon or Fontello. If you're using Font Awesome 6, switch to their SVG + JS method with tree-shaking so only the icons referenced in your HTML are bundled. The difference can drop your icon payload from 70 KB to under 5 KB.

5. Shipping Unminified CSS and JavaScript

Development-ready CSS files are padded with comments, whitespace, and long variable names that make sense for humans but add nothing for browsers. A stylesheet that's 120 KB in development might minify down to 65 KB — nearly half the size. Same goes for JavaScript, often more so.

The fix: Add a build step. Tools like Vite, Webpack, or even a simple PostCSS + cssnano pipeline handle this automatically. If you're on WordPress, plugins like Asset CleanUp or Autoptimize can minify and concatenate files without touching your theme. This isn't optional at this point — it should be part of every deployment.

6. Installing Fonts With Every Weight and Style Available

Google Fonts makes it dangerously easy to check every font weight. You load Inter, select Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, and Black — and you've just added 500+ KB of font files that your CSS probably references in two places.

The fix: Audit your actual usage. Most sites need two or three weights maximum. Specify only what you use in the font embed URL, and add font-display: swap so text renders immediately with a fallback while the custom font loads. Self-hosting fonts with preload hints gives you even more control and removes the third-party DNS lookup.

7. Not Using Gzip or Brotli Compression at the Server Level

Even after minifying your files, if your server isn't compressing the response, you're leaving significant savings on the table. Text-based assets — HTML, CSS, JavaScript, SVG — are highly compressible. Brotli compression can reduce a 100 KB JS file to around 22 KB over the wire.

The fix: Enable Brotli or Gzip in your server config. On Nginx, add gzip on; and specify the MIME types to compress. On Apache, use mod_deflate. Most managed hosting platforms and CDNs (Cloudflare, Netlify, Vercel) enable this by default — but if you're on a bare VPS, verify it with GTmetrix or a curl request checking the Content-Encoding response header.

8. PDFs and Documents That Were Never Optimized

This one slips under the radar constantly. A company brochure PDF exported from InDesign, a spec sheet from a supplier, a menu uploaded from Word — these files arrive on your site at 15, 30, sometimes 80 MB because nobody thought to compress them before hitting upload. Users on mobile networks will simply give up.

The fix: Run every PDF through Adobe Acrobat's "Reduce File Size" or "Optimize PDF" tool before uploading. For free alternatives, Smallpdf and iLovePDF both do a solid job. A 25 MB brochure can usually be knocked down to 2–4 MB with no visible quality loss for screen viewing. If you're converting documents from Word, export directly to PDF rather than printing to PDF — the file size difference is usually dramatic.

9. Ignoring Third-Party Scripts That Load Their Own Heavy Assets

Your own images and scripts are just part of the picture. That live chat widget, the cookie consent banner, the heatmap tool, the retargeting pixel suite — each one can load its own stylesheet, its own web font, its own analytics library. Stack five or six of these and you've silently added 400–800 KB to every page load, with zero control over how it's served.

The fix: Audit third-party scripts with a tool like WebPageTest or Chrome DevTools' Network tab filtered by domain. For anything non-critical, defer or lazy-load the script using the defer attribute or a tag manager trigger that fires after the page becomes interactive. Chat widgets, for example, don't need to load before a user can read your content — delay them by 3–5 seconds and users will never notice, but your performance scores will.

A Simple Workflow to Catch These Issues Before They Go Live

Rather than auditing a slow site after the fact, build a quick checklist into your pre-launch process:

  • Run every image through compression before uploading — make it a rule, not an afterthought.
  • Use PageSpeed Insights or Lighthouse in CI to flag regressions automatically.
  • Set a total page weight budget — something like 1 MB for most marketing pages is a reasonable ceiling.
  • Review third-party scripts quarterly — tools accumulate over time and often get forgotten even after campaigns end.

None of these fixes require a complete redesign or a new tech stack. Most of them take under an hour to implement and pay dividends every single time someone visits your site. The web is faster than ever for users who want it to be — the only thing standing in the way is usually an unoptimized JPEG from 2021 sitting in your uploads folder.