by matsemann · 6y ago · 0 comments
How usable are svg favicons nowadays? Do I still need a dozen link rels in my <head> with various icons in different formats/sizes? Currently I have one .ico file as rel="shortcut icon", 4 pngs in various sizes as "icon", 4 pngs as "apple-touch-icon" and 1 svg as "mask icon"
I use https://opentype.js.org/ to convert a font to path.
As you can see in https://caniuse.com/link-icon-svg all modern browsers support SVG favicon right now (88% of users globally). You can also download the PNG version to support wider audience. In the next version, I'll include support to download PNG version for all required sizes, with a sample html page and manifest.json file.
Also, support for dark mode is in my todo list.
There's a good article on this here https://medium.com/swlh/are-you-using-svg-favicons-yet-a-gui...
I just use https://realfavicongenerator.net/ which keeps things relatively easy.
https://caniuse.com/link-icon-svg
Supported by Edge, Firefox, Chrome, and Opera. Safari and iOS in a rather limited way, but you're still looking at about 70% of users with SVG icons alone. Not so sure how to look up if they're supported directly in the link element.
I just tested the "emoji" version on Chrome and it rendered some total junk as the icon, so I'm not sure about support for that either.