How to make a website fast without giving up on the design
Optimized images, zero JavaScript where it isn't needed and CSS animations. What we do so a good-looking website loads in under a second.
Updated on November 18, 2026

A good-looking website doesn’t have to be heavy. In most projects, what slows a page down isn’t the design but what ships with it: huge images, too many fonts and JavaScript loaded on pages that don’t do anything interactive.
This post sums up the choices we make here at the lab to keep the Lighthouse score above 95 without simplifying the design.
Start with the images
Images are often more than half of a page’s weight. Three rules solve almost everything:
- Serve WebP or AVIF at the size the image is shown, never the original file.
- Always set
widthandheight, so the browser reserves the space and the page doesn’t jump. - Use
loading="lazy"for everything below the fold, and high priority only for the main image.
In Astro, the <Image /> component does all three at once:
---
import { Image } from 'astro:assets';
import cover from './capa.jpg';
---
<Image src={cover} alt="Image description" widths={[640, 1280]} sizes="100vw" />
What about project images?
They live in the project folder, next to the text. At build time each one becomes several WebP files in different sizes, and the browser downloads only what it needs.
JavaScript only where it’s needed
A text page needs no JavaScript at all. Menus and filters need very little. The rule is simple: every script has to justify its own weight.
| Feature | Before | Now |
|---|---|---|
| Mobile menu | React component | HTML Popover API |
| Entrance animations | GSAP + ScrollTrigger | CSS with animation-timeline |
| Services marquee | Swiper | CSS animation |
CSS animations
Scroll-linked animations now work with CSS alone:
[data-animate] {
animation: fade-in-up linear both;
animation-timeline: view();
animation-range: entry 0% entry 55%;
}
Visitors who ask their system for less motion (
prefers-reduced-motion) get the content standing still, without missing anything.
Summary
A fast website is the sum of small decisions. None of them requires giving up on the design: they only require every byte to have a reason to be there.