A favicon is the small icon that appears in browser tabs, bookmarks, and home screens. Getting it right means providing multiple sizes for different contexts โ from the 16ร16 tab icon to the 512ร512 PWA splash screen icon.
Your favicon source should be a square image, at least 512ร512 pixels. PNG works best โ it supports transparency and is lossless. An SVG is even better as it scales perfectly to any size.
Instead of manually resizing, use the MultiMian ImageKit Favicon Generator. Upload your square image and it instantly generates all 8 sizes as a ZIP file:
๐ Generate Favicons Free โThe ZIP also includes an HTML snippet and a manifest.json icons entry ready to paste into your project.
Place these tags inside your <head>:
<link rel="icon" type="image/svg+xml" href="/favicon.svg"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> <link rel="manifest" href="/manifest.json">
For PWA support, add the icons to your manifest.json:
"icons": [
{ "src": "icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "icon-512.png", "sizes": "512x512", "type": "image/png" }
]