Open jonsneyers opened 2 years ago
This API is intended to focus on decoding capabilities and leave display/rendering capabilities to other specs, e.g., there are media queries in https://drafts.csswg.org/mediaqueries-5/.
For images, see ImageDecoder.isTypeSupported()
, and https://github.com/whatwg/html/pull/10055 which proposes adding isTypeSupported()
to img tags (HTMLImageElement).
This seems rather focused on video capabilities, but the key capability that matters is the display itself, which influences both video and still images. Color gamut, dynamic range, transfer curve, bit depth, peak nits, etc are as relevant for still images as for video.
Perhaps some of these concepts could be formulated in a somewhat more generic way, e.g. not using names like VideoConfiguration but rather DisplayCapabilities?
Also, I think this should be implemented in such a way that it can be made to work for images in an img tag without harming prefetch and without causing a combinatorial explosion of variants in the markup: X formats times Y dimensions times Z display capabilities is too much for a picture tag, a single img tag with the server figuring out which image to send based on request headers is the way to go imo.