Use WebP icons in web app manifest
Description
This updates the web app manifest from recommending PNG images to instead recommend WebP images.
Motivation
The MDN image file type and format guide recommends WebP over PNG.
Additional details
N/A
Related issues and pull requests
This is perhaps the most cited source for which browsers support WebP: https://caniuse.com/webp
And this PR does not recommend changing the favicon.ico file. But nowadays many websites are using WebP favicons for the <link rel="icon" ... on their site. (Source: GitHub search)
W3C does have a WebP in their manifest file.
Thanks @fulldecent . The caniuse means nothing much - that's browser not OS support, and also pretty much "can display in content".
The W3C explainer is perhaps a little more compelling. Not much though, because explainers have nowhere near the rigor of specifications.
Agree with your take, @hamishwillee, and the need to be cautious regarding webp support.
WebP is definitely a modern format, but favicons are a special case. We still recommend ico, gif, and png for favicons (in guide, in glossary). So in this case, I'd suggest not to switch to webp for the favicon.
Also, as a side note, the best practice when using webp would be to also specify a fallback image format.
Thanks @dipikabh It's a bit of a chicken and egg thing. I suspect the favicon will never need to replace .ico because in a 16x16 icon there is no compression benefit to webp (or PNG). But as the icons get bigger there might be benefit. If all your app imagery is in webp it is going to be tempting to keep your icons in the same format.
So at some point we should verify and possibly update the glossary and guide recommendations. For now though, I think manifest usage is more risky than any other usage.
Also, as a side note, the best practice when using webp would be to also specify a fallback image format.
I'd be more fine with this if it had a fallback.
@fulldecent I'm going to close this as "too early". Happy for it to be reopened with some verification about the platforms on which it is known to work and a fallback. Thanks again for contributing - really appreciate you going to the effort of not just noting the possible shortcoming, but adding a fix in a PR.