How AI helped me get my website to a perfect Lighthouse score Developer Dean Hume raised his blog's worst-performing pages from a Lighthouse score of 73 to 100 on almost all pages, including mobile, by handing the Lighthouse output to GitHub Copilot running a mix of Opus and GPT Astra. The AI's suggestion to use SVG for images proved wrong when testing showed AVIF and WebP were smaller, so Hume's build now only serves an AVIF width if it is at least 10% smaller than its WebP equivalent, and the first article-card image gets loading="eager" and fetchpriority="high" while the rest stay lazy-loaded. Hume cautioned the result still needs testing on real-world devices. 6 October 2026 ยท Dean Hume https://deanhume.com/about/ How AI helped me get my website to a perfect Lighthouse score I've been into web performance for as long as I can remember. Back in the day, I cared about it enough to write a book, Fast ASP.NET Websites https://www.manning.com/books/fast-asp-dot-net-websites . My career has since moved into gaming, and while I've kept an eye on web performance, I haven't stayed as up to date as I'd like. A few of the worst-performing pages on this blog were sitting at a Lighthouse score of 73. I'd been putting off tackling them, but after making some changes to the blog recently, I tried something different: I handed the performance problem to GitHub Copilot, using a mix of Opus and GPT Astra. I gave AI the Lighthouse output, pointed it at my theme, and asked it to work through the biggest problems first. I now have a Lighthouse score of 100 on almost all pages including mobile. It still needs testing on real-world devices, but I've never quite been able to achieve that in the past without a lot of pain. Where it got it wrong It didn't get it perfect the first time round, but it did a pretty amazing job. The AI assumed SVG would be the smallest and best image format for many of the pages. It's a reasonable guess - SVGs are brilliant for the right job - but when I actually tested it, AVIF and WebP came out smaller for my images. AVIF are a new format for me personally, although they have been around for a while and are well supported. If I hadn't checked, I'd have shipped a slower site and felt very pleased with myself ๐Ÿ˜‚ Smaller images, measured rather than assumed On other pages, AI suggested that the feature image changed from SVG to PNG so it could go through the image build, which already generated responsive WebP versions. Rather than assume AVIF would win for every image, the build now compares the files. Every generated AVIF width has to be at least 10% smaller than its WebP equivalent. If any width fails that comparison, the site sticks with WebP for that image. Where AVIF meets the threshold, a