Back to Blog
3 min read

How We Cut Our Hero Image Size by 95% Without Losing Quality

The Problem: A 1MB PNG Holding Back Our Page

Last week, while auditing the AustinsElite landing page during our June performance push, I spotted a glaring bottleneck: a hero image weighing in at 1.01 MB. It was a PNG—crisp, detailed, and completely overkill.

This wasn’t just a file size issue. That single asset was dragging down our Largest Contentful Paint (LCP), a core web vital that directly impacts SEO and user experience. On slower connections, the image took seconds to load, leaving users staring at a blank hero section.

I knew we could do better. PNGs are great for transparency and sharp graphics, but for photographic or complex hero visuals? They’re rarely the right choice in 2024.

The Fix: Smarter Compression with WebP

The solution? Convert to WebP. Google’s image format delivers superior compression with minimal quality loss—especially for photographic content. But I didn’t want to just swap formats and hope for the best. I needed a repeatable, quality-preserving workflow.

Here’s what I did:

  1. Tooling: I used sharp, the same library Next.js uses under the hood, to ensure consistency with how images are processed in production. Command-line conversion gave me full control:
sharp hero-original.png \
  --format webp \
  --quality 80 \
  --output hero-optimized.webp
  1. Quality Threshold: I tested at 80% quality—a sweet spot where artifacts were imperceptible on both desktop and mobile. Dropping below 75% introduced subtle noise in gradient areas, which wasn’t worth the marginal savings.

  2. Validation: I opened both the original PNG and the new WebP side-by-side on a 4K monitor. At 100% zoom, the difference was negligible. On actual device screens? Undetectable.

  3. Integration: Since AustinsElite uses Next.js for frontend components (while the primary app runs on Laravel 12), I dropped the new asset into public/images and updated the next/image component:

<Image
  src="/images/hero-optimized.webp"
  alt="AustinsElite hero"
  width={1920}
  height={1080}
  priority
/>

No build config changes needed—Next.js natively supports WebP and serves it automatically to compatible browsers.

The Results: 95% Smaller, 2x Faster

The final WebP file? 53.5 KB. That’s a 95% reduction from 1.01 MB.

More importantly, the performance impact was immediate:

  • LCP improved by ~400ms on average in lab tests (using Lighthouse in Chrome DevTools)
  • No visual regressions reported during QA
  • Bandwidth savings add up—especially for mobile users

This wasn’t just about one image. It was part of a broader June 2024 performance initiative that included deferring non-critical analytics, optimizing responsive breakpoints, and auditing unused CSS. But the hero image was the biggest win—low effort, high impact.

Why This Matters in 2024

Core web vitals aren’t just Google’s latest fad—they’re a direct reflection of user experience. A slow-loading hero image can increase bounce rates, hurt conversions, and quietly tank your SEO.

And the fix doesn’t require a framework overhaul or a redesign. Just smart asset handling.

WebP is now supported in all modern browsers (caniuse.com says 98% global coverage). If you’re still shipping PNGs or JPEGs for hero visuals, you’re leaving performance on the table.

At AustinsElite, we’re using Laravel 12 for the core application logic, but our frontend marketing pages—like the one this hero lives on—are built with Next.js. That means we get the best of both worlds: Laravel’s robust backend and Next.js’s optimized asset pipeline. Leveraging that pipeline correctly is key.

So next time you’re polishing a production site, run an audit. Find that one bloated image. Convert it. You might be shocked by how much faster your page feels.

Because sometimes, the biggest performance wins come from the smallest files.

Newer post

How We Solved a Sticky Header Transition Loop in Next.js with Scroll Threshold Logic

Older post

How We Fixed a Silent UX Killer: From Placeholder Links to Dynamic Routing in Laravel