Overview
Nuxt SEO Utils includes a CLI for generating favicon and app icon variants from a single source image. It produces all the standard sizes needed for modern browsers and devices.
When running in development mode, the module will detect if your project is missing favicon files and suggest the CLI command to generate them.
Icon Generation
Generate favicon and icon variants from a source image in your public/ directory:
npx nuxt-seo-utils icons --source logo.svgWhat It Generates
| File | Size | Purpose |
|---|---|---|
icon-16x16.png | 16x16 | Small favicon |
icon-32x32.png | 32x32 | Standard favicon |
apple-touch-icon.png | 180x180 | iOS home screen |
icon-192x192.png | 192x192 | Android / PWA |
icon-512x512.png | 512x512 | PWA splash |
favicon.ico | 16x16, 32x32, 48x48 | Browser and legacy support |
All files are written to your public/ directory and automatically detected by the module.
Supported source formats: SVG, PNG, JPG, JPEG, and WebP files are supported as input. SVG is recommended for best quality at all sizes.
Requirements
The CLI uses sharp for image processing. Sharp is an optional peer dependency. The module does not install it automatically. If you use icon generation, install it as a dev dependency:
pnpm add -D sharpOptions
| Option | Description |
|---|---|
--source | Source image file relative to the public directory (required) |
--cwd | Working directory (default: .) |