PHPackages                             innomedio/sulu-image-optimizer-bundle - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. innomedio/sulu-image-optimizer-bundle

ActiveSymfony-bundle[File &amp; Storage](/categories/file-storage)

innomedio/sulu-image-optimizer-bundle
=====================================

Optimizes images before they are being uploaded and stored in the Sulu media library

v3.0(5mo ago)25.8k↓28.1%MITPHPPHP ^8.2

Since May 23Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/innomedio/sulu-image-optimizer-bundle)[ Packagist](https://packagist.org/packages/innomedio/sulu-image-optimizer-bundle)[ Docs](https://www.innomedio.be)[ RSS](/packages/innomedio-sulu-image-optimizer-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (8)Used By (0)

SuluImageOptimizerBundle
========================

[](#suluimageoptimizerbundle)

This bundle optimizes and optionally resizes images **before** they're added to the Sulu media library.

Its especially useful when working with large files on shared hosting environments, where Sulu's default image processing (like cropping) may hit server resource limits.

✨ Features
----------

[](#-features)

- Automatically optimizes uploaded images
- Optional resizing to limit image dimensions
- Option to ignore specific image types (e.g. GIFs)

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require innomedio/sulu-image-optimizer-bundle
```

Make sure the bundle is registered in `config/bundles.php` (usually automatic):

```
Innomedio\Sulu\ImageOptimizerBundle\InnomedioSuluImageOptimizerBundle::class => ['all' => true],

```

⚙️ Configuration
----------------

[](#️-configuration)

Add the configuration to your Symfony config, e.g. in `config/packages/innomedio_sulu_image_optimizer.yaml`:

```
innomedio_sulu_image_optimize_config:
  enabled: true

  logger: 'monolog.logger.image_optimizer' # optional logger

  resize:
    enabled: true
    max_size: 4000 # pixels, based on the longest side

  ignore_types:
    - gif
    - bmp

```

### Configuration Reference

[](#configuration-reference)

OptionTypeDefaultDescription`enabled`boolean`true`Whether optimization is active`logger`string/null`null`(Optional) PSR logger service ID`ignore_types`array`[]`List of file extensions to skip optimization (e.g. `gif`, `bmp`, `webp`)`resize.enabled`boolean`true`Whether resizing is active`resize.max_size`integer`4000`Maximum width or height in pixels🔧 How It Works
--------------

[](#-how-it-works)

The bundle listens to image upload requests on Sulu routes like:

- `sulu_media.post_media`
- `sulu_media.post_media_trigger`

Once detected, it:

1. Validates the file is an image
2. Optionally skips optimization based on extension (`ignore_types`)
3. Optimizes the file using [Spatie Image Optimizer](https://github.com/spatie/image-optimizer)
4. Optionally resizes the image if it exceeds the configured `max_size`
5. Saves the modified image before it's passed to Sulu

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance73

Regular maintenance activity

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~217 days

Recently: every ~324 days

Total

7

Last Release

153d ago

Major Versions

v1.0.2 → v2.02024-05-27

v2.2 → v3.02025-12-16

PHP version history (2 changes)v1.0PHP ^8.0

v2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ca0f754be097b353909584a9b10c851ab0f787792f1abfaf399ba79ac5b46b8?d=identicon)[innomedio](/maintainers/innomedio)

---

Top Contributors

[![eekes](https://avatars.githubusercontent.com/u/9445616?v=4)](https://github.com/eekes "eekes (8 commits)")

---

Tags

symfonyimageuploadsuluinnomedio

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/innomedio-sulu-image-optimizer-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/innomedio-sulu-image-optimizer-bundle/health.svg)](https://phpackages.com/packages/innomedio-sulu-image-optimizer-bundle)
```

###  Alternatives

[presta/image-bundle

PrestaImageBundle is a Symfony bundle providing tools to resize uploaded and remote images before sending them through a classic form.

24155.9k](/packages/presta-image-bundle)[itskodinger/midia

Simple Media manager for your Laravel project

1415.8k](/packages/itskodinger-midia)[liyunfang/yii2-upload-behavior

Upload behavior for Yii 2

161.7k](/packages/liyunfang-yii2-upload-behavior)

PHPackages © 2026

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