Let the browser measure it
A site built last year with a perfectly good image pipeline was still sending the 1600px file to a phone, and it turned out to be the same missing attribute I wrote a whole post about in 2018.
6 posts filed under Images, newest first.
A site built last year with a perfectly good image pipeline was still sending the 1600px file to a phone, and it turned out to be the same missing attribute I wrote a whole post about in 2018.
The padding-top percentage trick is dead and has been for a while, replaced by one declaration that says the thing it means.
I pointed an AVIF encoder at a client's product photography before bed and it was still grinding away at breakfast, which settled the format question for me faster than any benchmark did.
I added lazy loading to every image on a site in about 20 minutes, felt pleased with myself, and then measured it and found the pages were taking longer to show their main content than before I started.
I launched that homepage at 180 KB, it is 2.4 MB now, and the only thing anybody did was change the picture through the form I built for changing the picture.
Every conversation about page weight goes straight to minification. Meanwhile there is a 2 MB image on the page that nobody has opened since Photoshop.