in-square/pimcore-favicon-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require in-square/pimcore-favicon-bundle
包简介
Favicon generator bundle for Pimcore.
README 文档
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.jsonnamemanifest_base_path-> base path used inmanifest.jsoniconsrc
Notes
- Source file is saved as
/public/favicon/source.png. - Uploading a new image regenerates all files.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2025-12-30