← Level 6 – Project lead

Lesson 6 of 8 ⏱ 30 minutes Premium

Website Speed

Measure your website with Lighthouse, shrink your images, and speed up loading.

Why speed matters

Half of all people close a website that takes longer than 3 seconds to load. Your visitors won’t all have a brand-new phone on fast Wi-Fi – some will have an older phone on a train. A project boss thinks about them too.

Good news: you can get the biggest speed boost from just one thing – images. A photo straight from a phone can easily be 5 MB; a website only needs a tenth of that.

Show me: measure with Lighthouse

Lighthouse is a measuring tool built right into Chrome:

  1. Open your website (the live version, not localhost).
  2. F12 → Lighthouse tab → Analyze page load.
  3. You’ll get a score from 0–100 for performance, accessibility, SEO – and most importantly, a list of specific tips on what to improve.

The most common tips and what to do about them:

Lighthouse tipWhat to do
Properly size imagesshrink your images (see below)
Serve images in next-gen formatssave them as WebP
Image elements do not have width/heightadd width and height attributes
Links do not have descriptive textinstead of “click here”, say where the link goes

Shrink your images

  1. Dimensions: a website only needs about 1200px width (a hero photo) or about 600px (a regular photo). You can resize in any editor, even online (e.g. squoosh.app).
  2. Format: WebP is about a third smaller than JPG at the same quality.
  3. Lazy loading: images below the fold only load once the visitor scrolls down to them:
<img src="photo.webp" alt="Match against the Eagles" width="600" height="400" loading="lazy" />

Now it’s your turn 💪

  1. Measure your website with Lighthouse and write down your performance score – that’s your starting line.
  2. Find the 3 largest images on your website (F12 → Network tab → sort by Size).
  3. Shrink them (dimensions + WebP) and add loading="lazy" to everything except the first image at the top.
  4. Measure again and compare scores. Write in LAUNCH.md: before → after.
  5. Bonus: test your website on your phone with Wi-Fi turned off. What’s it like?
💡

Don’t expect 100 points. Even big websites score 70–90. What matters is progress: going from 60 to 85 is a win that visitors will actually notice.

Check: You know your Lighthouse score before and after. Your images are resized, in WebP, and using lazy loading. Your website noticeably loads faster on mobile.

What to take away from this lesson