srcset, revisited
The exact bug I wrote about in 2018, on a site built last year, by a competent team, with a modern pipeline. Which tells you which parts of this got fixed in eight years.
7 posts filed under Images, newest first.
The exact bug I wrote about in 2018, on a site built last year, by a competent team, with a modern pipeline. Which tells you which parts of this got fixed in eight years.
Most image optimization advice is about codecs, but the actual bug is usually that nobody has opened the file and looked at it since the day it came out of Figma.
Two things happened to image formats this fall, and the less exciting one is much more useful. I'd like a flowchart for choosing between them. I don't think one can exist.
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.
The browser has to pick an image before it knows how big that image will be on the page, so it guesses, and `sizes` is the attribute where you tell it what it's guessing about.
I shipped that homepage at 180 KB and it is currently 2.5 MB, and nobody did anything wrong. They just changed the picture like they were supposed to be able to.
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.