Which files a website needs today
You no longer need twenty sizes. These five files cover every browser, the phone home screen and Google search results:
favicon.icowith 16, 32 and 48 px inside: older browsers, RSS readers and Google ask for it, and Google looks for it in the root even if you don’t link it.icon.svg: a single vector file that stays sharp at any size. Only generated in text mode.apple-touch-icon.pngat 180 px, for the iPhone home screen. It has no transparency, because iOS fills the background with black.icon-192.pngandicon-512.png, linked fromsite.webmanifestfor Android and installable web apps.
How to install it
Download the ZIP, copy the files into the root of your site (where index.html lives) and paste the HTML
into the <head>. If you change the icon later, the browser may take a while to notice because it caches
it: renaming the file or adding ?v=2 to the link sorts it out.
Design tips
- At 16 px you can’t make out detail: a letter, a symbol or the most recognisable stroke of the logo works better than the whole logo.
- Check the icon in both tabs of the preview: a dark favicon disappears in the browser’s dark theme.
- Each size is drawn at its real resolution rather than scaled down from the 512, so the 16 px one comes out as sharp as possible.
A placeholder favicon in one line
If you just need something while you build, the ximg.es generator already serves a square image with a letter, with nothing to download:
<link rel="icon" href="https://ximg.es/32x32/2563eb/fff.png?text=X">