This is a personal reference for the Picture component on my site. I kept copy-pasting image markup across pages until it got messy enough to fix. This page documents the variants so I don’t have to dig through the source every time I forget the API.

Source: Picture.astro

Default

<Picture img={myImage} imgAlt="A screenshot" />
Example of the default variant

Transparent

<Picture img={logo} imgAlt="Company logo" variant="transparent" />
Example of the transparent variant

Full

<Picture img={heroImage} imgAlt="Detailed screenshot" variant="full" />
Example of the full variant

Grid

<Picture
img={[image1, image2]}
imgAlt={["Before", "After"]}
variant="grid"
columns={2}
/>
First image in grid
Second image in grid

columns={2} and columns={3} supported. Collapses to one column on small screens.

Grid Full

<Picture
img={[image1, image2]}
imgAlt={["One", "Two"]}
variant="grid-full"
columns={2}
/>
First image in full grid
Second image in full grid
Disclaimer: This piece reflects my personal opinions and experiences at the time of writing. Over time, my perspectives may evolve, and your experiences may differ from mine. If you come across anything factually incorrect or wish to discuss something further, feel free to reach out to me through any of the links below.