Favicons that just work.
Display any site's favicon effortlessly. Zero deps. < 1KB.
Why react-site-icon?
- Reliably distinguishes real favicons from Google's default globe (that fallback when no favicon exists) — no other lib does.
- Sharp at every size. Auto-bumps the fetch to 24px when you ask for 16px so detection still works.
- Accepts any domain shape — hostname, URL, URL with path. Normalized internally.
- SSR-safe and hydration-aware. Cached or prefetched images don't get stuck on the fallback.
- < 1KB minified + gzipped. Zero runtime dependencies. Works with React 17, 18, and 19.
Install
npm install react-site-icon