PHPackages                             genkgo/favicon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. genkgo/favicon

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

genkgo/favicon
==============

Generate browser favicons

0.3.7(1y ago)1032.3k↓75.3%6[6 issues](https://github.com/genkgo/favicon/issues)[2 PRs](https://github.com/genkgo/favicon/pulls)MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0CI passing

Since Aug 1Pushed 1y ago3 watchersCompare

[ Source](https://github.com/genkgo/favicon)[ Packagist](https://packagist.org/packages/genkgo/favicon)[ RSS](/packages/genkgo-favicon/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (13)Used By (0)

Genkgo/Favicon - Generate favicon for your website
==================================================

[](#genkgofavicon---generate-favicon-for-your-website)

[![Latest Version](https://camo.githubusercontent.com/277d12f55b9150e0759c6cbdafb7cf3fc332772662d93dca11b068fdc87340a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f67656e6b676f2f66617669636f6e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/genkgo/favicon/releases)

Requires PHP 8.1+ and both the imagick and DOM extension.

Install using composer
----------------------

[](#install-using-composer)

```
composer require genkgo/favicon
```

Create favicon package quick and easy
-------------------------------------

[](#create-favicon-package-quick-and-easy)

```
use Genkgo\Favicon;

$outputDirectory = '/var/www/html/favicon';

$input = Favicon\Input::fromFile('/var/www/html/logo.png', InputImageType::PNG);
// or add a different background color
$input = Favicon\Input::fromFile('/var/www/html/logo.png', InputImageType::PNG, '#FF0000');
// or use a svg as input
$input = Favicon\Input::fromFile('/var/www/html/logo.svg', InputImageType::SVG);
// or create a letter avatar
$input = Favicon\Input::digit('G', '#FFFFFF', '#00AAAD');

$generator = Favicon\FullPackageGenerator::newGenerator();
$manifest = new Favicon\WebApplicationManifest(
    Favicon\WebApplicationManifestDisplay::Standalone,
    'Title of website',
    'Short name of website',
    '#00AAAD', // theme color
    '#00AAAD', // tile color
);
foreach ($generator->package($input, $manifest, '/') as $fileName => $contents) {
    $pathName = $outputDirectory . '/' . $fileName;
    file_put_contents($pathName, $contents);
}

// append the head tags to your document
$document = new DOMDocument('1.0', 'UTF-8');
$html = $document->createElement('html');
$document->appendChild($html);

$head = $document->createElement('head');
foreach ($generator->headTags($document, $manifest, '/') as $tag) {
    $head->appendChild($tag);
}

// or just generate the tag strings
$tags = [];
$document = new DOMDocument('1.0', 'UTF-8');
foreach ($generator->headTags($document, $manifest, '/') as $tag) {
    $tags[] = $document->saveHTML($tag);
}
```

or use the command-line.

```
./vendor/bin/favicon-generator --help
./vendor/bin/favicon-generator 'Title of the website' file:public/logo.png output
./vendor/bin/favicon-generator 'Title of the website' file:public/logo.png output --theme-color=#00AAAD --icon-background=#00AAAD --root=/
./vendor/bin/favicon-generator 'Title of the website' letter:G output
./vendor/bin/favicon-generator 'Title of the website' letter:G output --letter-color=#FFFFFF --theme-color=#00AAAD --icon-background=#00AAAD --root=/
```

Full package
------------

[](#full-package)

- apple-touch-icon.png
- browserconfig.xml
- favicon.ico
- favicon.png
- favicon-16x16.png
- favicon-32x32.png
- favicon-48x48.ico
- favicon-48x48.png
- favicon-57x57.png
- favicon-76x76.png
- favicon-96x96.png
- favicon-128x128.png
- favicon-192x192.png
- favicon-228x228.png
- favicon-512x512.png
- index.html
- mstile-70x70.png
- mstile-150x150.png
- mstile-310x310.png
- safari-pinned-tab.svg
- web-app-manifest.json

Tests
-----

[](#tests)

There are no tests. Maybe later.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~152 days

Total

12

Last Release

416d ago

PHP version history (3 changes)0.1.0PHP ~8.1.0 || ~8.2.0

0.3.4PHP ~8.1.0 || ~8.2.0 || ~8.3.0

0.3.5PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d827a1c73491b0599e518a1a1bac8aa5cb07a4e3a68fcf90bfd05959ae6d302?d=identicon)[frederikbosch](/maintainers/frederikbosch)

---

Top Contributors

[![frederikbosch](https://avatars.githubusercontent.com/u/1552577?v=4)](https://github.com/frederikbosch "frederikbosch (28 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (2 commits)")[![skeemer](https://avatars.githubusercontent.com/u/864069?v=4)](https://github.com/skeemer "skeemer (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/genkgo-favicon/health.svg)

```
[![Health](https://phpackages.com/badges/genkgo-favicon/health.svg)](https://phpackages.com/packages/genkgo-favicon)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
