eekes / sulu-image-optimizer-bundle
Optimizes and resizes images before they are stored in the Sulu media library, with a log of what every upload saved
Package info
github.com/eekes/sulu-image-optimizer-bundle
Type:symfony-bundle
pkg:composer/eekes/sulu-image-optimizer-bundle
v1.0.1
2026-11-05 14:55 UTC
Requires
- php: ^8.3
- ext-gd: *
- ext-libxml: *
- ext-xmlreader: *
- doctrine/dbal: ^3.8 || ^4.0
- doctrine/doctrine-bundle: ^2.13 || ^3.0
- doctrine/orm: ^2.17.3 || ^3.3
- enshrined/svg-sanitize: ^1.0
- psr/log: ^3.0
- spatie/image: ^3.8
- spatie/image-optimizer: ^1.8
- sulu/sulu: ^3.0
- symfony/config: ^7.2 || ^8.0
- symfony/console: ^7.2 || ^8.0
- symfony/dependency-injection: ^7.2 || ^8.0
- symfony/doctrine-bridge: ^7.2 || ^8.0
- symfony/event-dispatcher: ^7.2 || ^8.0
- symfony/framework-bundle: ^7.2 || ^8.0
- symfony/http-foundation: ^7.2 || ^8.0
- symfony/http-kernel: ^7.2 || ^8.0
- symfony/process: ^7.2 || ^8.0
- symfony/routing: ^7.2 || ^8.0
Requires (Dev)
- php-cs-fixer/shim: ^3.58
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpstan/phpstan-doctrine: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.5 || ^12.1
- symfony/browser-kit: ^7.2 || ^8.0
- symfony/monolog-bundle: ^3.10 || ^4.0
- symfony/yaml: ^7.2 || ^8.0
Suggests
None
Provides
None
Conflicts
Replaces
None
README
Optimizes and resizes every upload to the Sulu 3 media library before Sulu stores it, so every image format Sulu creates later starts from a sensible file instead of a 40 megapixel phone photo. What every upload saved is logged under Settings → Image optimization.
What's inside
- Optimizes every upload: scales down oversized images, removes EXIF and GPS data, sanitizes SVGs, and never stores a larger file than the original.
- The optimization log: size and dimensions before and after for every upload, in the Sulu admin.
- Optimizing existing media: run the existing library through it, as new versions that can be undone.
- Server setup: works with GD alone, and squeezes out more with jpegoptim, pngquant, cwebp and friends.
- Migrating from innomedio: the step from
innomedio/sulu-image-optimizer-bundleto this bundle.
Documentation
Installation, configuration and everything else: sulu.eekes.be/sulu-image-optimizer-bundle.
License
MIT