Ending Responsive Images

Chris Coyier Chris Coyier on

The sizes attribute for <img> was maybe the hardest part. It had complicated syntax that always had to be in sync with whatever your CSS was doing. But sizes="auto" support is almost ready for prime time. Jason Grigsby says we can go a step further an remove srcset too, which is nearly just as complex, and requires having a system to produce multiple images. Jason’s thinking is that we can use newfangled Client Hints to send to the server what size image we need, it responds in kind, and we’re back to a pretty basic <img src="" alt=""> situation. Well, do lazy loading too, but you know what I mean.

Looking for a complete course on getting into web development?

Leave a Reply

Your email address will not be published. Required fields are marked *

$966,000

Master.dev donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.