PHPackages                             khalsa-jio/silverstripe-favicon-generator - 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. khalsa-jio/silverstripe-favicon-generator

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

khalsa-jio/silverstripe-favicon-generator
=========================================

A SilverStripe CMS module for generating and managing website favicons with support for multiple formats and sizes.

6.x-dev(8mo ago)30BSD-3-ClauseJavaScriptCI passing

Since Aug 25Pushed 8mo agoCompare

[ Source](https://github.com/khalsa-jio/silverstripe-favicon-generator)[ Packagist](https://packagist.org/packages/khalsa-jio/silverstripe-favicon-generator)[ RSS](/packages/khalsa-jio-silverstripe-favicon-generator/feed)WikiDiscussions main Synced 1mo ago

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

SilverStripe Favicon Generator
==============================

[](#silverstripe-favicon-generator)

A comprehensive SilverStripe CMS module for generating and managing website favicons with support for multiple formats, sizes, and generation methods.

Features
--------

[](#features)

- **Dual Generation Modes**: Upload ZIP from favicon generators or upload a single image for automatic generation
- **Multiple Formats**: Supports ICO, PNG, SVG, JSON manifest, and XML browserconfig files
- **Complete Size Coverage**: Generates all standard favicon sizes (16x16, 32x32, 48x48, 180x180, 192x192, 256x256, 384x384, 270x270)
- **Image Processing**: Uses ImageMagick or GD for high-quality image generation
- **Asset Management**: Fully integrated with SilverStripe's asset management system
- **CMS Integration**: Easy-to-use interface in Site Settings

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

[](#requirements)

- SilverStripe Framework ^6.0
- SilverStripe Admin ^3.0
- Display Logic ^3.0
- PHP extensions: ImageMagick (recommended) or GD for image generation

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

[](#installation)

```
composer require khalsa-jio/silverstripe-favicon-generator
```

After installation, run a dev/build to apply database changes:

```
vendor/bin/sake dev/build flush=1
```

Usage
-----

[](#usage)

### Via CMS Admin

[](#via-cms-admin)

1. Log into your SilverStripe admin panel
2. Navigate to Settings &gt; Site Settings
3. Click on the "Favicon" tab
4. Choose your generation method:

#### Method 1: ZIP Upload (Recommended)

[](#method-1-zip-upload-recommended)

- Generate a favicon package using [RealFaviconGenerator](https://realfavicongenerator.net/)
- Download the ZIP file
- Upload the ZIP file through the CMS interface
- Configure color values as needed

#### Method 2: Single Image Generation

[](#method-2-single-image-generation)

- Upload a high-resolution square image (minimum 512x512px)
- Enable "Auto-generate when image changes"
- The module will automatically generate all required sizes and formats

### Template Integration

[](#template-integration)

The module includes a pre-built template that handles all favicon links automatically. Simply add this single line to your page template:

```

```

**That's it!** The included template will automatically output all necessary favicon links and meta tags based on the files configured in Site Settings.

#### What's Included Automatically

[](#whats-included-automatically)

The `` template automatically adds:

- Standard favicon (ICO format for legacy browsers)
- PNG favicons for modern browsers (16x16, 32x32)
- Apple Touch Icon for iOS devices
- Safari Pinned Tab icon with configured color
- Web App Manifest for PWA support
- Theme color meta tag for mobile browsers
- Microsoft application config for Windows tiles
- Fallback MS Application meta tags

#### Advanced Template Usage

[](#advanced-template-usage)

If you need more control, you can manually add individual favicon elements:

```

```

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

[](#configuration)

The module comes with sensible defaults but can be customized via YAML configuration:

```
# app/_config/favicon-config.yml
KhalsaJio\FaviconGenerator\Extension\SiteConfigExtension:
  defaults:
    FaviconManifestThemeColour: '#ffffff'
    FaviconMSAppTileColour: '#174a5b'
    FaviconMaskIconColour: '#a2b7bd'
    FaviconGenerationMode: 'zip'
    AutoGenerateFromSource: true
```

File Structure
--------------

[](#file-structure)

Generated files are organized in the assets directory:

```
assets/
└── favicons/
    └── site{ID}/
        ├── archives/          # ZIP files (protected)
        ├── favicon.ico
        ├── favicon-16x16.png
        ├── favicon-32x32.png
        ├── apple-touch-icon.png
        ├── android-chrome-192x192.png
        ├── android-chrome-256x256.png
        ├── android-chrome-384x384.png
        ├── mstile-150x150.png
        ├── safari-pinned-tab.svg
        ├── site.webmanifest
        └── browserconfig.xml

```

Supported File Formats
----------------------

[](#supported-file-formats)

### Input Formats (Single Image Mode)

[](#input-formats-single-image-mode)

- PNG
- JPEG/JPG
- SVG

### Generated Output Formats

[](#generated-output-formats)

- **ICO**: favicon.ico (48x48)
- **PNG**: Various sizes (16x16, 32x32, 180x180, 192x192, 256x256, 384x384, 270x270)
- **SVG**: Safari pinned tab icon
- **JSON**: Web app manifest
- **XML**: Microsoft browserconfig

Browser Support
---------------

[](#browser-support)

Generated favicons support all modern browsers including:

- Chrome/Chromium
- Firefox
- Safari
- Edge
- Internet Explorer 11+
- Mobile browsers (iOS Safari, Android Chrome)

Troubleshooting
---------------

[](#troubleshooting)

### Image Generation Issues

[](#image-generation-issues)

- Ensure ImageMagick or GD PHP extension is installed
- Check PHP memory limits for large source images
- Verify write permissions in assets directory

### ZIP Upload Issues

[](#zip-upload-issues)

- Ensure ZIP contains all required files with exact filenames
- Check file size limits in PHP configuration
- Verify ZIP file structure matches expected format

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

[](#contributing)

Contributions are welcome! Please ensure:

- Code follows PSR-12 standards
- All tests pass
- Documentation is updated

License
-------

[](#license)

This module is licensed under the BSD-3-Clause license. See [LICENSE](LICENSE) for details.

Support
-------

[](#support)

For issues, feature requests, or questions:

- Create an issue on the GitHub repository
- Check existing issues for solutions
- Review the SilverStripe documentation for general CMS help

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance59

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity21

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

261d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4ba3aed1b8a62571382c6e0b06766e9c12b7f38d0152606aebbfe978febc2ee?d=identicon)[Sukhwinder Singh](/maintainers/Sukhwinder%20Singh)

---

Top Contributors

[![khalsa-jio](https://avatars.githubusercontent.com/u/68214394?v=4)](https://github.com/khalsa-jio "khalsa-jio (2 commits)")

---

Tags

silverstripecms

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/khalsa-jio-silverstripe-favicon-generator/health.svg)

```
[![Health](https://phpackages.com/badges/khalsa-jio-silverstripe-favicon-generator/health.svg)](https://phpackages.com/packages/khalsa-jio-silverstripe-favicon-generator)
```

###  Alternatives

[adrhumphreys/silverstripe-textdropdownfield

A text field combined with a dropdown field.

106.1k](/packages/adrhumphreys-silverstripe-textdropdownfield)

PHPackages © 2026

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