Web platform features explorer

srcset and sizes

Widely available since 2019-09-27
Tags: api html Groups: HTML

The srcset and sizes attributes for <img> elements set a list of possible sources for the image and a corresponding list of size conditions for choosing a source, to show a responsive image that fits the size of the display.

Learning resources on MDN

No MDN documentation found. You can search for the feature on MDN. If you believe that MDN has no documentation about this feature, you can open an issue on MDN's GitHub repository.

Browser support (view on caniuse.com)

Specifications