DEV Community

Cover image for How I built a 100/100 PageSpeed score with Astro
Charlie McLean
Charlie McLean

Posted on

How I built a 100/100 PageSpeed score with Astro

When I started Base7 Studio I made one commitment — every site
we ship has to be fast. Not "pretty fast". Actually fast.

Here's what gets us to 100/100 on Google PageSpeed consistently.

No page builders

Every site is hand-coded with Astro. No WordPress, no Webflow,
no Squarespace. Page builders ship enormous amounts of JavaScript
and CSS that the browser has to parse before anything renders.
We skip all of it.

Zero unused JavaScript

Astro ships zero JS by default. We only hydrate components that
actually need interactivity. Most pages on our sites ship with
less than 5kb of JavaScript.

Image optimisation

Astro's built-in Image component handles WebP conversion, lazy
loading, and correct sizing automatically. No more massive PNGs
killing your LCP score.

Font loading strategy

We use font-display: swap and preload only the weights we actually
use. Most sites load 6+ font variants they never render — that's
dead weight on every page load.

Self-hosted fonts

No Google Fonts requests. Every font is self-hosted and served
from the same domain. Eliminates a render-blocking third-party
request on every page load.

The result

Our own site at base7studio.com scores 100/100 on PageSpeed on
mobile. Every client site we ship goes through the same process.

If you're building client sites with Astro I'd love to hear what
optimisations you're using — drop them in the comments.

You can see it live at base7studio.com
we also built a free PageSpeed checker on the site if you want to
test your own.

Top comments (0)