PHPackages                             digitonic/laravel-favicon-extractor - 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. digitonic/laravel-favicon-extractor

AbandonedArchivedLibrary

digitonic/laravel-favicon-extractor
===================================

A favicon extractor for Laravel

1.0.7(6y ago)1290MITPHPPHP ^7.0

Since Aug 20Pushed 6y agoCompare

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

READMEChangelog (8)Dependencies (6)Versions (18)Used By (0)

Laravel Favicon Extractor
=========================

[](#laravel-favicon-extractor)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cf6971d73d70f3b65c415b26cb77991e596b45617e0cb1641a773a959c7fa389/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64696769746f6e69632f6c61726176656c2d66617669636f6e2d657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitonic/laravel-favicon-extractor)[![Build Status](https://camo.githubusercontent.com/923318864ccb6c19809feda873aecd0bdf8f047aeb10f95d61d6776299b6e62b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64696769746f6e69632f6c61726176656c2d66617669636f6e2d657874726163746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/digitonic/laravel-favicon-extractor)[![Total Downloads](https://camo.githubusercontent.com/d709a175f290643ffbe0cf3d6653cac5f62c01c733e8200f27e52a2343f68cae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64696769746f6e69632f6c61726176656c2d66617669636f6e2d657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitonic/laravel-favicon-extractor)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This package provides a convenient way to extract a favicon from any website by using the appropriate Google service. It allows you to fetch and save it to your local storage.

Usage
-----

[](#usage)

Usage is very simple. You can either pull it in via Dependency Injection or use the Facade.

- For the Dependency Injection version, type hint the `FaviconExtractorInterface`.
- For the Facade version, use the `FaviconExtractor` Facade.

### General

[](#general)

- If no favicon could be found, it returns a default one.
- The favicon's extension is always `.png`. It's not necessary to be part of your filename.

### Fetch the favicon only

[](#fetch-the-favicon-only)

```
$favicon = FaviconExtractor::fromUrl('https://laravel.com')->fetchOnly();
```

It returns a instance which implements `FaviconInterface` where you can retrieve the raw content of the favicon with `$favicon->getContent()`.

### Fetch and download the favicon

[](#fetch-and-download-the-favicon)

If you prefer to save the favicon to your local storage, you can. The only requirement is to define the path, where the favicon should be saved. It's relative to your root path which you defined in `config/filesystems.php`. Saying your path to save is `favicons`, it will be saved to `app/storage/favicons`.

#### With a random generated filename

[](#with-a-random-generated-filename)

```
FaviconExtractor::fromUrl('https://laravel.com')->fetchAndSaveTo('favicons');
// returns favicons/HIgLtwL0iUdNkwfq.png
```

#### With a custom filename

[](#with-a-custom-filename)

```
FaviconExtractor::fromUrl('https://laravel.com')->fetchAndSaveTo('favicons', 'myFilename');
// returns favicons/myFilename.png
```

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

[](#installation)

To install this package, require it via composer.

```
$ composer require digitonic/laravel-favicon-extractor
```

Thanks to Laravel 5.5+ Package Auto-Discovery, there is no need to add the ServiceProvider manually. If you don't use auto-discovery, add the ServiceProvider to the providers array in `config/app.php`.

```
StefanBauer\LaravelFaviconExtractor\FaviconExtractorServiceProvider::class,
```

If you want to use the facade, add this to your facades array in `config/app.php`.

```
'FaviconExtractor' => StefanBauer\LaravelFaviconExtractor\Facades\FaviconExtractor::class,
```

Configuration
-------------

[](#configuration)

If you would like to modify the configuration, use the publish command to copy the package config over.

```
php artisan vendor:publish --provider="StefanBauer\LaravelFaviconExtractor\FaviconExtractorServiceProvider" --tag="config"
```

The configuration file has only two options you can change. The `provider_class` and the `filename_generator_class`. In general, there is no need to change it, unless you like to have a different implementations how the favicon is fetched and how the filename is generated. Pleae take care of implementing the corresponding interfaces.

Testing
-------

[](#testing)

```
$ vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

Please take a look at the [CHANGELOG](CHANGELOG.md) what has changed recently.

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

[](#contributing)

Please take a look at [CONTRIBUTING](CONTRIBUTING.md) for more information.

License
-------

[](#license)

The MIT License (MIT). Please take a look at the [LICENSE](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 64.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 ~32 days

Recently: every ~3 days

Total

17

Last Release

2305d ago

Major Versions

0.45 → 1.0.02020-01-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104549?v=4)[Steven Richardson](/maintainers/richdynamix)[@richdynamix](https://github.com/richdynamix)

---

Top Contributors

[![stefanbauer](https://avatars.githubusercontent.com/u/3192662?v=4)](https://github.com/stefanbauer "stefanbauer (9 commits)")[![ChrisCrawford1](https://avatars.githubusercontent.com/u/44769623?v=4)](https://github.com/ChrisCrawford1 "ChrisCrawford1 (2 commits)")[![LKaemmerling](https://avatars.githubusercontent.com/u/4281581?v=4)](https://github.com/LKaemmerling "LKaemmerling (2 commits)")[![tutNichts](https://avatars.githubusercontent.com/u/2473492?v=4)](https://github.com/tutNichts "tutNichts (1 commits)")

---

Tags

faviconslaravelfaviconstefanbauerlaravel-favicon-extractor

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/digitonic-laravel-favicon-extractor/health.svg)

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

###  Alternatives

[stefanbauer/laravel-favicon-extractor

A favicon extractor for Laravel

10125.3k](/packages/stefanbauer-laravel-favicon-extractor)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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