--- 'astro': minor --- Adds experimental support for generating `srcset` attributes and a new `` component. ## `srcset` support Two new properties have been added to `Image` and `getImage()`: `densities` and `widths`. These properties can be used to generate a `srcset` attribute, either based on absolute widths in pixels (e.g. [300, 600, 900]) or pixel density descriptors (e.g. `["2x"]` or `[1.5, 2]`). ```astro --- import { Image } from "astro"; import myImage from "./my-image.jpg"; --- My cool image ``` ```html My cool image ``` ## Picture component The experimental `` component can be used to generate a `` element with multiple `` elements. The example below uses the `format` property to generate a `` in each of the specified image formats: ```astro --- import { Picture } from "astro:assets"; import myImage from "./my-image.jpg"; --- ``` The above code will generate the following HTML, and allow the browser to determine the best image to display: ```html My super image in multiple formats! ``` The `Picture` component takes all the same props as the `Image` component, including the new `densities` and `widths` properties.