in-square/pimcore-favicon-bundle

Favicon generator bundle for Pimcore.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:pimcore-bundle

pkg:composer/in-square/pimcore-favicon-bundle

v1.0.0 2025-12-30 20:27 UTC

This package is not auto-updated.

Last update: 2025-12-31 18:44:11 UTC


README

Generate favicon assets and manifest from a single uploaded image, with an admin module for upload and preview.

Requirements

  • PHP 8.1+
  • Symfony 6.4
  • Pimcore 11 (Admin UI Classic / ExtJS)

Installation

composer require in-square/pimcore-favicon-bundle

Register the bundle in config/bundles.php if needed:

<?php

return [
    // ...
    InSquare\PimcoreFaviconBundle\InSquarePimcoreFaviconBundle::class => ['all' => true],
];

Install assets and register permissions:

php bin/console assets:install
php bin/console pimcore:bundle:install InSquarePimcoreFaviconBundle

Grant the favicon_settings permission to the target roles/users (Admin -> Settings -> Users/Roles).

Admin module

Open: Settings -> Favicon

  • Upload a source image
  • Preview the current source
  • Delete the favicon set

Upload generates the full set of icons + manifest.json into:

/public/favicon

Delete clears /public/favicon/*.

Generated sizes

  • Apple touch: 57, 60, 72, 76, 114, 120, 144, 152, 180
  • Android: 36, 48, 72, 96, 144, 192
  • Favicon: 16, 32, 96
  • MS tile: 144

Twig rendering

Use in your base layout <head>:

{{ render_favicon() }}

The function returns the standard HTML tags (apple-touch-icon, icon, manifest, and meta tags). If required files are missing, it returns an empty string.

Configuration

Create config/packages/in_square_pimcore_favicon.yaml:

in_square_pimcore_favicon:
  theme_color: '#ffffff'
  tile_color: '#ffffff'
  manifest_name: 'App'
  manifest_base_path: '/favicon'
  • theme_color -> <meta name="theme-color">
  • tile_color -> <meta name="msapplication-TileColor">
  • manifest_name -> manifest.json name
  • manifest_base_path -> base path used in manifest.json icon src

Notes

  • Source file is saved as /public/favicon/source.png.
  • Uploading a new image regenerates all files.