How to #Favicon in 2022: Six files that fit most needs — Martian Chronicles, Evil Martians’ team blog
▻https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs
The extremely short version
Instead of serving dozens of icons, all you need is just five icons and one JSON file.
For the browser using HTML:
<link rel="icon" href="/favicon.ico" sizes="any"><!-- 32×32 -->
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png"><!-- 180×180 -->
<link rel="manifest" href="/manifest.webmanifest">
And in your web app manifest:
// manifest.webmanifest
{
"icons": [
{ "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
{ "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
]
}