wellcomecollection.org
wellcomecollection.org copied to clipboard
Do we need the separate Image and Picture types?
An Image supports multiple crops; a Picture only has a single size. It's not immediately obvious to me why we have both, and whether we need two distinct types.
We should investigate, and either:
- Discover we don't need two, and get rid of one (probably collapse uses of Picture into Image)
- Discover we do need two, and document the reason
Could do with more context on this one! Is this a Prismic thing?
This ticket was created because we have different React components to render an image, these are only a few as I'm sure there are more:
-
Picture, which uses the
html element - Then various components that use
next/image
's Image (e.g.ZoomedPrismicImage
,PrismicImage
) - And just to list it, sometimes we just use the
image
html element.
So it doesn't have to do with Prismic, really, but with how we treat image rendering. What we'd like to use this ticket for is to understand why we use those different methods and possibly establish when each should be used.
This ticket was mentioned during our a11y training as we were told that <picture>
didn't have a useful role
. I'll add the a11y label so it's on the same radar.