I've been using JS to lazy load images when in viewport. thinking of switching to just loading=lazy. Any reason _not_ to?
@raymondcamden i can't think of any. It works beautifully

@raymondcamden No reason not to, do it today!

You can even use it on header images as the heuristic of "in viewport" applies there too.

You can even dig into possibilities with https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding while you're at it!

HTMLImageElement: decoding property - Web APIs | MDN

The decoding property of the HTMLImageElement interface provides a hint to the browser as to how it should decode the image. More specifically, whether it should wait for the image to be decoded before presenting other content updates or not.

MDN Web Docs

@raymondcamden Browsers have been able to natively display text and images since the beginning. Requiring JS in order to have browser do something it already knows to do itself should be discouraged and even ridiculed.

So thumbs up for any move away from reckless JS overuse! 😃