Favicon Generator
Generate a modern favicon set from one source image (PNG, JPEG, WebP, or SVG):
favicon-16x16.png,favicon-32x32.pngfavicon.ico(16, 32, 48)apple-touch-icon.png(180×180)icon-192.png,icon-512.png,icon-maskable-512.pngsite.webmanifestfavicon-links.html(optional HTML snippet)favicon.svgwhen the source is SVG
Install
Python 3.10 or newer. The PyPI package name is lupaxa-favicon-generator.
The console command is favicon-generator.
SVG input also needs the system Cairo library (brew install cairo on macOS,
or apt install libcairo2 on Debian/Ubuntu).
python -m pip install lupaxa-favicon-generator
From a clone, for development:
python -m pip install -e ".[dev]"
Use
favicon-generator --help
favicon-generator logo.png
Default output directory: ./favicons. Use --overwrite if that directory
already contains generated files you want replaced.
The same commands work as a module:
python -m lupaxa.favicon_generator --help
python -m lupaxa.favicon_generator logo.png
SVG and Site Paths
SVG input is rasterised with cairosvg and also copied to favicon.svg in the
output directory. Use --prefix so the HTML snippet and site.webmanifest
point at the correct public path (for example assets/favicons/ or
/favicons/). --name / --short-name feed the web manifest.
favicon-generator logo.svg \
--output-dir site/assets/favicons \
--prefix /assets/favicons/ \
--name "My App" \
--short-name "App" \
--theme-colour "#0A0A0A" \
--background-colour "#0A0A0A" \
--background "#0A0A0A" \
--padding 0.05
Fit, Background, and Padding
| Flag | Notes |
|---|---|
--fit contain|cover|stretch |
How the source fills each canvas (contain default). |
--background |
Canvas fill: transparent, CSS name, or hex. |
--padding |
Fractional padding 0.0–0.45. |
For Apple touch icons, prefer a non-transparent --background so iOS does not
composite onto an unexpected fill. Maskable icons use an opaque white fill
when --background is transparent.
Skipping Optional Outputs
favicon-generator logo.png --no-ico --no-html
favicon-generator logo.png --output-dir favicons --overwrite
| Flag | Effect |
|---|---|
--no-ico |
Skip favicon.ico. |
--no-html |
Skip the HTML snippet. |
--no-manifest |
Skip site.webmanifest. |
--overwrite |
Replace existing generated files. |
CLI Options
Run favicon-generator --help for the authoritative list from your installed
version.
| Option | Default | Description |
|---|---|---|
source |
(required) | Source image: PNG, JPEG, WebP, or SVG. |
-o / --output-dir |
favicons |
Output directory. |
--fit |
contain |
contain, cover, or stretch. |
--background |
transparent |
Canvas background. |
--padding |
0 |
Fractional padding 0.0–0.45. |
--theme-colour |
#FFFFFF |
theme-color / manifest theme_color. |
--background-colour |
same as --theme-colour |
Manifest background_color. |
--name |
source stem or App |
Manifest name. |
--short-name |
same as --name |
Manifest short_name. |
--prefix |
(empty) | URL prefix for HTML and manifest. |
--html-file |
favicon-links.html |
HTML snippet filename. |
--no-manifest |
off | Skip site.webmanifest. |
--no-html |
off | Skip HTML snippet. |
--no-ico |
off | Skip favicon.ico. |
--overwrite |
off | Replace existing files. |
Testing
make init
make python-install-dev
make python-check
Or without Make:
python -m pip install -e ".[test]"
pytest
Coverage for lupaxa.favicon_generator is reported by default. Optional Cairo
SVG integration tests run when marked and skip if native Cairo is unavailable:
pytest -m cairo
Metadata
Release files for lupaxa-favicon-generator 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lupaxa_favicon_generator-0.1.7.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lupaxa_favicon_generator-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.1 kB
Release files / lupaxa_favicon_generator-0.1.7.tar.gz
| Download URL | lupaxa_favicon_generator-0.1.7.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a20b3ff80c6093fd8c67dda30bb2ce67332a5b3a87b0ac4d0f25674f4f7fa828
|
|
BLAKE2b-256 checksum How to use checksums |
b04e24a88ae4d7435c721e3f03ef868572243c0b5b39ddbba5ad94c97842dffe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / lupaxa_favicon_generator-0.1.7-py3-none-any.whl
| Download URL | lupaxa_favicon_generator-0.1.7-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c3f75f53f79c0f29bf1b6646b5c0a924ba22007022ad0c7eed65bc9ed791fca
|
|
BLAKE2b-256 checksum How to use checksums |
1c0aaf20a216014bfa23b12ea198365c632929628669875eb3e4f4940af34fc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency log