This is an inaccurate over-simplification. If you just use HTML and CSS, you can also have really bad Lighthouse scores. For example, vanilla ` ` will ship the same image to every device, regardless of viewport size. Vanilla ` ` doesn't enforce setting `width` and `height`, which makes your layouts shift. Slow-loading images and layout shifts are the very things that will downgrade the "100" score he's currently prou…
Back in the day you sized your image for the web, there was no need for dimensions in img tags > For example, vanilla ` ` will ship the same image to every device, As it should be, for simplicity's sake. Designers trying to assert pixel-perfect control of layout is part of why the web sucks so much today. Let the browser handle layout, that is one of the things it is designed to do!
If you do this, then a browser/user/client that wants that information simply doesn't have it - you can't create bits from thin air.
If you leave the metadata in, then any browser that wants it can use it, and any brower that doesn't want it can ignore it.
I can code up a Greasemonkey script in a few minutes that will strip the width and height attributes from img tags, but nobody on earth can write a script that will magically detect what size the author wants them to be if they don't send that data to you.