PHPackages                             dmamontov/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. dmamontov/favicon

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

dmamontov/favicon
=================

Class generation favicon for browsers and devices Android, Apple, Windows and display of html code. It supports a large number of settings such as margins, color, compression, three different methods of crop and screen orientation.

1.0.0(10y ago)523.7k8[1 PRs](https://github.com/dmamontov/favicon/pulls)BSD-3-ClausePHPPHP &gt;=5.3.3CI failing

Since Jul 1Pushed 7y ago3 watchersCompare

[ Source](https://github.com/dmamontov/favicon)[ Packagist](https://packagist.org/packages/dmamontov/favicon)[ Docs](http://www.slobel.ru/)[ RSS](/packages/dmamontov-favicon/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/17e090862c2f596b46f7af5478dbeb4c1275909387ffc44808e306435dc248ca/68747470733a2f2f706f7365722e707567782e6f72672f646d616d6f6e746f762f66617669636f6e2f762f737461626c652e737667)](https://packagist.org/packages/dmamontov/favicon)[![License](https://camo.githubusercontent.com/4836673db376aa5a6bb7c29a64dc7c7c36c1155e35a050a2a3972442904b3b65/68747470733a2f2f706f7365722e707567782e6f72672f646d616d6f6e746f762f66617669636f6e2f6c6963656e73652e737667)](https://packagist.org/packages/dmamontov/favicon)[![Total Downloads](https://camo.githubusercontent.com/1096adfe19e08393d77a7b8e4f039b7cc8d9ecb6010e0fc9a3ab9120480ee5cd/68747470733a2f2f706f7365722e707567782e6f72672f646d616d6f6e746f762f66617669636f6e2f646f776e6c6f616473)](https://packagist.org/packages/dmamontov/favicon)[![PHP Classes](https://camo.githubusercontent.com/8b4a94a79f43f44687b40e0a91a226a5b6d929b69cba415d01253b2343065bf0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d636c61737365732d626c75652e737667)](http://www.phpclasses.org/package/9265-PHP-Create-Favicon-images-for-sites-and-mobile-devices.html)

Favicon Generator
=================

[](#favicon-generator)

This class can create Favicon images for sites and mobile devices.

It takes a give base icon image and creates multiple versions of the image for use as favicon on Web sites or be displayed by mobile devices like those using systems of Apple, Microsoft, and Android.

The class can generate all the versions of the icon images with the different sizes, as well the necessary HTML to reference the icon images in a Web page.

The margins, color, compression, crop method and screen orientation are configurable parameters.

Requirements
------------

[](#requirements)

- PHP version ~5.3.3
- Module installed Imagick

Installation
------------

[](#installation)

1. Install [composer](https://getcomposer.org/download/)
2. Follow in the project folder:

```
composer require dmamontov/favicon ~1.0.0
```

In config `composer.json` your project will be added to the library `dmamontov/favicon`, who settled in the folder `vendor/`. In the absence of a config file or folder with vendors they will be created.

If before your project is not used `composer`, connect the startup file vendors. To do this, enter the code in the project:

```
require 'path/to/vendor/autoload.php';
```

### Example of work

[](#example-of-work)

```
$fav = new FaviconGenerator(__DIR__ . '/tests.png');

$fav->setCompression(FaviconGenerator::COMPRESSION_VERYHIGH);

$fav->setConfig(array(
    'apple-background'    => FaviconGenerator::COLOR_BLUE,
    'apple-margin'        => 15,
    'android-background'  => FaviconGenerator::COLOR_GREEN,
    'android-margin'      => 15,
    'android-name'        => 'My app',
    'android-url'         => 'http://slobel.ru',
    'android-orientation' => FaviconGenerator::ANDROID_PORTRAIT,
    'ms-background'       => FaviconGenerator::COLOR_GREEN,
));

echo $fav->createAllAndGetHtml();
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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

Unknown

Total

1

Last Release

3974d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5955726?v=4)[Dmitry Mamontov](/maintainers/dmamontov)[@dmamontov](https://github.com/dmamontov)

---

Top Contributors

[![dmamontov](https://avatars.githubusercontent.com/u/5955726?v=4)](https://github.com/dmamontov "dmamontov (6 commits)")[![lukapeharda](https://avatars.githubusercontent.com/u/2076692?v=4)](https://github.com/lukapeharda "lukapeharda (1 commits)")

---

Tags

generationapplewindowsandroidfaviconbrowsers

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[pkpass/pkpass

PHP PKPass class for iOS Wallet

9733.0M6](/packages/pkpass-pkpass)[marcocesarato/php-conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org

2511.3M109](/packages/marcocesarato-php-conventional-changelog)[thenextweb/passgenerator

A Laravel package to create Apple Wallet (old Passbook) compatible tickets.

297435.6k](/packages/thenextweb-passgenerator)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[nelexa/google-play-scraper

Scrapes app data from Google Play store.

88487.4k](/packages/nelexa-google-play-scraper)

PHPackages © 2026

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