One SVG in, an optimised favicon set out: favicon.ico, icon.svg, an apple-touch-icon and
maskable PWA icons, each PNG the smallest encode that passes a measured accuracy bar.
No install at all: favseed.cevdet.ch runs the same pipeline in your browser, and nothing is uploaded.
favseed needs Node 24 or newer and nothing else:
npm install --save-dev favseedThe image engine, @napi-rs/image, installs with the package, prebuilt for Linux, macOS and
Windows on x64 and arm64, and FreeBSD on x64. Install
has the details.
npx favseed logo.svg --out publicThis writes five files to public/ and prints their sizes. Command line
lists every flag, and SVG input what your source needs.
// vite.config.js
import { defineConfig } from 'vite'
import favseed from 'favseed/vite'
export default defineConfig({
plugins: [favseed({ input: 'src/logo.svg' })],
})vite dev serves the icons from memory and vite build writes them next to index.html.
See Vite plugin.
Put your SVG at src/logo.svg, then run this from your Astro project:
npx astro add favseedThe <link> tags go into every page that does not already have a <link rel="icon">.
See Astro integration.
| File | Size | Bytes |
|---|---|---|
icon.svg |
vector | 392 B |
favicon.ico |
48×48 | 464 B |
apple-touch-icon.png |
180×180 | 778 B |
icon-192.png |
192×192 | 816 B |
icon-512.png |
512×512 | 1,279 B |
Bytes for the general test fixture at the default effort; yours depend on your mark.
The three PNGs sit on a black ground by default (--bg), the mark placed in the safe zone so a
platform's mask cuts nothing. --manifest also writes site.webmanifest. Outputs
covers every file in detail.
favseed --html prints the tags for your <head>:
<link rel="icon" href="/favicon.ico" sizes="48x48">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">- Documentation: install and start in 30 seconds.
- Command line: every flag, the config file and the effort levels.
- SVG input: the viewBox, text and images, dark mode and animation.
- Vite plugin: icons from memory in dev, emitted in the build.
- Astro integration: setup, options, caching and head tags.
- Node API:
build(),buildFiles()and the TypeScript types. - Troubleshooting: common problems and safe upgrades.
- Guides: the minimal favicon set, maskable icons and dark-mode favicons.
- How it works: the steps from one SVG to the finished set.
- Outputs: each file, the HTML it needs and who reads it.
- Compare: favseed next to favicons, astro-favicons, Vite PWA and RealFaviconGenerator.
- Benchmarks: the measurements behind the defaults.
- Decisions: what was measured and what changed.
- Changelog
For usage questions, start with the documentation. Use the repository's issue forms for bugs and feature requests. See CONTRIBUTING.md for setup and the measurement requirements for pipeline changes.
Follow the code of conduct in project discussions. Report sensitive findings through the security policy.
Created and maintained by Cevdet Haran (cevdetch).
MIT. favseed spawns nothing. @napi-rs/image is MIT (its quantiser has been clean-room MIT
code since 1.13.0), the resvg inside it is Apache-2.0 OR MIT, and the bundled Google Zopfli
is Apache-2.0. Zopfli and WASI libc notices ship under lib/. The dependency tree holds no GPL code.