logoalt Hacker News

rhdunn • today at 12:55 PM • 1 reply • view on HN

The picture element [1], [2] supports controlling which image is used via a media selector, allowing you to serve smaller images on smaller devices and on things like the viewport orientation.

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

[2] https://caniuse.com/picture


Replies

littlecranky67 • today at 3:19 PM

Great and all such, but it doesn't do the actual work of resizing your one highres image to all those breakpoints - which is part of the build process in NextJS.