andreia/Generate Favicons
Generate ICO, PNG, webmanifest and browserconfig favicons from a single SVG or raster source image.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| image | Path to the source image relative to the repository root. SVG is strongly recommended (best quality at all sizes). Also accepts PNG, JPG, WEBP, GIF — use 512×512 px or larger for raster sources. | yes | — |
| output_path | Directory (relative to the repo root) where all favicon files will be written. Will be created if it does not exist. | no | public/favicons |
| preset | Favicon size preset: ico-only — favicon.ico only (16×16 + 32×32 layers) minimal — ICO + 16, 32, 144, 152 px (iOS/IE basics) extended — ICO + all major iOS & Android sizes all — Every known size, manifests and HTML snippet (recommended) custom — Provide exact sizes via the `sizes` input | no | all |
| sizes | Comma-separated pixel sizes used when preset is "custom". Example: 16,32,96,180,192 Allowed values: 16 24 32 48 57 60 64 70 72 76 96 114 120 128 144 150 152 167 180 192 196 256 310 | no | "" |
| background_color | Hex background color for opaque tile variants (Windows Metro / IE tiles). Use "none" to keep full transparency everywhere. | no | #ffffff |
| force | Set to "true" to regenerate all favicons even if they already exist in output_path. When "false" (default), the action skips generation entirely if favicon.ico is already present, making it safe to run on every push without unnecessary work. | no | false |
| commit | Set to "true" to automatically commit the generated favicons back to the repository. The workflow must have contents: write permission. | no | false |
| commit_message | Commit message used when commit is true. | no | chore: update favicons [skip ci] |
Outputs
| name | description |
|---|---|
| skipped | "true" if generation was skipped because favicons already existed and force was not set. "false" if favicons were (re)generated. |
| output_path | Absolute path to the directory containing the generated favicons. |
| files_generated | Number of favicon files written (0 when skipped). |
| favicon_ico | Absolute path to the generated favicon.ico file (empty when skipped). |