PHPackages                             flavioheleno/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. [Image &amp; Media](/categories/media)
4. /
5. flavioheleno/favicon

ActiveLibrary[Image &amp; Media](/categories/media)

flavioheleno/favicon
====================

A library to parse pages and web manifests to extract favicon images

17PHPCI failing

Since Jul 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/flavioheleno/favicon)[ Packagist](https://packagist.org/packages/flavioheleno/favicon)[ RSS](/packages/flavioheleno-favicon/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

favicon
=======

[](#favicon)

A library to parse pages and web manifests to extract favicon images

Install
-------

[](#install)

The best way to install the library is using the [Composer Package Manager](https://getcomposer.org/).

To install, run the following command:

```
php composer.phar require flavioheleno/favicon
```

This package is not tied to any specific library that sends HTTP Messages. Instead, it uses [PSR-17](https://www.php-fig.org/psr/psr-17/) (HTTP Factories) and [PSR-18](https://www.php-fig.org/psr/psr-18/) (HTTP Clients) to let developers choose whichever PSR-17 and PSR-18 implementations they want to use.

If you don't use any specific PSR-17 or PSR-18 libraries and want to get started right away you should run the following command:

```
php composer.phar require flavioheleno/favicon kriswallsmith/buzz nyholm/psr7
```

This will install the library itself along with a PSR-17 implementation ([nyholm/psr7](https://github.com/nyholm/psr7)) and a PSR-18 implementation ([kriswallsmith/buzz](https://github.com/kriswallsmith/Buzz)).

You can replace those libraries with any alternative library that provides [HTTP Message Implementation (PSR-17)](https://packagist.org/providers/psr/http-factory-implementation) or [HTTP Client Implementantion (PSR-18)](https://packagist.org/providers/psr/http-client-implementation).

Usage
-----

[](#usage)

### Extract all Icons

[](#extract-all-icons)

```
use Buzz\Client\Curl;
use Favicon\Extractor;
use Nyholm\Psr7\Factory\Psr17Factory;

$extractor = new Extractor(
  new Curl(new Psr17Factory()),
  new Psr17Factory()
);

$favicon = $extractor->from('https://twitter.com');
foreach ($favicon->getIconCollection() as $icon) {
  echo $icon->getRelationship(), ': ', $icon->getUrl(), PHP_EOL;
}
```

```
manifest: https://abs.twimg.com/responsive-web/client-web-legacy/icon-default.ee534d85.png
manifest: https://abs.twimg.com/responsive-web/client-web-legacy/icon-default-large.8e027b65.png
manifest: https://abs.twimg.com/responsive-web/client-web-legacy/icon-default-maskable.2fd29c85.png
manifest: https://abs.twimg.com/responsive-web/client-web-legacy/icon-default-maskable-large.ee2b7aa5.png
shortcut icon: http://abs.twimg.com/favicons/twitter.2.ico
apple-touch-icon: https://abs.twimg.com/responsive-web/client-web-legacy/icon-ios.b1fc7275.png

```

License
-------

[](#license)

This library is licensed under the [MIT License](LICENSE).

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/471860?v=4)[Flávio Heleno](/maintainers/flavioheleno)[@flavioheleno](https://github.com/flavioheleno)

---

Top Contributors

[![flavioheleno](https://avatars.githubusercontent.com/u/471860?v=4)](https://github.com/flavioheleno "flavioheleno (3 commits)")

### Embed Badge

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

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

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