alto/favicon

Generate a modern favicon set (SVG icon, apple-touch-icon, favicon.ico, Web Manifest) from a single SVG or PNG file.

Maintainers

Package info

github.com/altophp/favicon

Homepage

Documentation

pkg:composer/alto/favicon

Transparency log

Fund package maintenance!

smnandre

Statistics

Installs: 75

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v1.0.1 2026-07-30 02:21 UTC

This package is auto-updated.

Last update: 2026-08-13 08:17:35 UTC


README

Generate a focused, modern favicon set from one SVG or PNG source.

  PHP Version   CI   Packagist   License   GitHub Sponsors

ALTO Favicon produces the small set of files current browsers and devices need, plus the exact HTML tags required to use them. The CLI and PHP API share the same options, preserve SVG input for modern browsers, and select an available rasterizer automatically.

vendor/bin/favicon assets/logo.svg --output public/favicons

The default result includes icon.svg, favicon.ico, apple-touch-icon.png, and favicon.html. Optional flags add a Web App Manifest, Android icons, a maskable icon, and a Google Search PNG.

Installation

Install ALTO Favicon with Composer:

composer require alto/favicon

ALTO Favicon requires PHP 8.3 or later. SVG input needs rsvg-convert, Inkscape, ImageMagick CLI, or the Imagick extension. PNG input needs Imagick or GD. Composer installs the PHP package dependencies automatically.

Quick Start

Generate the default set from an SVG:

vendor/bin/favicon assets/logo.svg --output public/favicons

Then copy the generated contents of public/favicons/favicon.html into the document <head>.

Add a manifest and a dedicated Google Search icon when needed:

vendor/bin/favicon assets/logo.svg \
    --output public/favicons \
    --public-path /favicons \
    --app-name "My App" \
    --manifest \
    --search-png

Documentation

Guide Contents
Documentation index Browse the complete guide set
Getting started Generate and install the first favicon set
CLI Commands, flags, and examples
PHP API Programmatic generation and reports
Configuration Options, defaults, and overwrite behavior
Rasterizers SVG and PNG adapter selection
Generated files Default and optional outputs
Errors Input and rasterization failures

Contributing

Contributions of all kinds are welcome. Visit the project on GitHub to report a bug, suggest a feature, or open a pull request.

Before submitting code, run:

# Runs PHP CS Fixer, PHPStan, and PHPUnit
composer qa

Support

ALTO Favicon is open source. You can support its continued development through GitHub Sponsors.

Sharing this package with others or starring it on GitHub is also much appreciated.

License

ALTO Favicon is released by ALTO PHP under the MIT License.