microformats / microformats2-parsing

For collecting and handling issues with the microformats2 parsing specification: http://microformats.org/wiki/microformats2-parsing
14 stars 6 forks source link

Support `<picture>` element #54

Open Seirdy opened 2 years ago

Seirdy commented 2 years ago

Users should be able to use <picture> elements to support image sets in which the user agent chooses an image based on supported formats and media queries.

For example, users should be able to specify multiple image formats for their h-card's u-photo. For example, they could select next-gen formats (e.g. JPEG-XL, AVIF, and maybe webp2 someday) with fallbacks to legacy formats (webp, png, jpg); they could also select variants based on media queries such as prefers-color-scheme to better fit different color palettes. Currently, it's only possible to select one image.

Furthermore: some agents don't support SVGs due to their complexity, but support raster formats just fine. A u-photo is meant to be consumed by a variety of agents and should therefore be compatible with lower-common-denominators. Users who use an SVG as their photo should have a means to specify a raster fallback.

Adding this issue by suggestion of @tantek

Seirdy commented 2 years ago

Related: https://github.com/microformats/microformats2-parsing/issues/7 concerns srcsets for <img> elements

Related: https://github.com/microformats/microformats2-parsing/issues/53 is a generic issue for supporting multiple sources for <picture>, <video>, and <img>. #53 could be considered a meta-issue that this issue and #7 fall under.