PHPackages                             luispabon/favicon-finder - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. luispabon/favicon-finder

ActiveLibrary[File &amp; Storage](/categories/file-storage)

luispabon/favicon-finder
========================

PHP Library used to discover favicon from given URL

1.1.0(4y ago)3109Apache-2.0PHPPHP &gt;=7.3.0CI failing

Since Nov 8Pushed 4y agoCompare

[ Source](https://github.com/luispabon/favicon-finder)[ Packagist](https://packagist.org/packages/luispabon/favicon-finder)[ Docs](https://github.com/luispabon/favicon)[ RSS](/packages/luispabon-favicon-finder/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

[![Build status](https://camo.githubusercontent.com/4d964ec7876f5e3e2000029f386bea201d0085c919ad85f434c19ccddc2073be/68747470733a2f2f63692e6175726f6e636f6e73756c74696e672e636f2e756b2f6170692f76312f7465616d732f6d61696e2f706970656c696e65732f66617669636f6e2d66696e6465722d6d61737465722f6a6f62732f616e616c797a652d6d61737465722f6261646765)](https://ci.auronconsulting.co.uk/teams/main/pipelines/favicon-finder-master)[![Code coverage](https://camo.githubusercontent.com/90bed3b35f4f36fbfdd3ece40ab9209e874e41867bbbe8a4494a8e2d6ffd78fa/68747470733a2f2f636f6465636f762e696f2f67682f6c7569737061626f6e2f66617669636f6e2d66696e6465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/luispabon/favicon-finder)

Favicon Finder
==============

[](#favicon-finder)

Simple PHP library to work out the favicon for a site, given an URL.

It currently supports finding the default favicon, if it exists on the host (eg `/favicon.ico`) as well as some basic HTML parsing of the homepage to hunt for standard favicon tags. Does not support `apple` type icons or manifests, although it can be extended to do so if necessary (PRs welcome).

This library is based on [Arthur Hoaro's work](https://github.com/ArthurHoaro/favicon).

Here are the changes you can see in this version:

- Only return favicon paths, when found
- PSR-16: Simple Cache support
- More extensive HTML scraping tests
- PHP 7.3+ support

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

[](#requirements)

- [PHP 7.3](http://php.net/)
- [php-xml](http://php.net/manual/fr/refs.xml.php) extension: parse HTML content
- [php-curl](https://www.php.net/manual/en/curl.installation.php)
- [Guzzle](https://github.com/guzzle/guzzle)
- GNU Make (or compatible): This is optional, if you want to contribute and use the Makefile targets available for running tests

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

[](#installation)

```
composer req luispabon/favicon-finder
```

Basic usage
-----------

[](#basic-usage)

```
require_once('vendor/autoload.php');

$guzzle = new \GuzzleHttp\Client();

// You can use any PSR-16 implementation here - if you have none and don't care
// about caching, simply use the provided dummy cache implementation below
$cache = new \FaviconFinder\DummyCache();

// Cache lifetime in seconds (default is 86400 or 1 day)
$ttl = 60;

$favicon = new \FaviconFinder\Favicon($guzzle, $cache, $ttl);

echo $favicon->get('https://github.com/luispabon/favicon-finder');

// Displays: https://github.com/favicon.ico
var_dump($favicon->get('http://nofavicon.tld'));
// Returns null
```

Contributing
------------

[](#contributing)

Fork this repo, do your stuff, send a PR. Tests are mandatory:

- PHP unit coverage must be 100%
- Infection MSI must be 100%
- PHPStan must show no errors

The provided [Makefile](Makefile) has all the basic test targets and is what's in use in CI.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.1% 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 ~246 days

Total

4

Last Release

1638d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.2.0

1.1.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/268a9e640f58c966811c5e3470d28aea0de2e5f86fa53095cfe9357ba12cb3f4?d=identicon)[luispabon](/maintainers/luispabon)

---

Top Contributors

[![luispabon](https://avatars.githubusercontent.com/u/6388823?v=4)](https://github.com/luispabon "luispabon (77 commits)")[![ArthurHoaro](https://avatars.githubusercontent.com/u/1962678?v=4)](https://github.com/ArthurHoaro "ArthurHoaro (32 commits)")[![Alkarex](https://avatars.githubusercontent.com/u/1008324?v=4)](https://github.com/Alkarex "Alkarex (10 commits)")[![shiflett](https://avatars.githubusercontent.com/u/67555?v=4)](https://github.com/shiflett "shiflett (6 commits)")[![kitbs](https://avatars.githubusercontent.com/u/4569320?v=4)](https://github.com/kitbs "kitbs (1 commits)")

---

Tags

finderfaviconicon

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[arthurhoaro/favicon

PHP Library used to discover favicon from given URL

36737.4k](/packages/arthurhoaro-favicon)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[mpclarkson/icon-scraper

PHP Library to get the apple-touch-icons and favicon from a website.

2129.2k](/packages/mpclarkson-icon-scraper)[yosymfony/resource-watcher

A simple resource watcher using Symfony Finder

698.2M22](/packages/yosymfony-resource-watcher)[dmhendricks/file-icon-vectors

A collection of file type icons in SVG format.

35774.8k6](/packages/dmhendricks-file-icon-vectors)[ergebnis/classy

Provides collectors for classy constructs (classes, enums, interfaces, and traits).

382.8M20](/packages/ergebnis-classy)

PHPackages © 2026

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