PHPackages                             rollingglory/yii2-image-optimizer - 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. [Image &amp; Media](/categories/media)
4. /
5. rollingglory/yii2-image-optimizer

ActiveYii2-extension[Image &amp; Media](/categories/media)

rollingglory/yii2-image-optimizer
=================================

The image optimizer integration for the Yii framework

11341PHP

Since Oct 2Pushed 7y ago2 watchersCompare

[ Source](https://github.com/rollingglory/yii2-image-optimizer)[ Packagist](https://packagist.org/packages/rollingglory/yii2-image-optimizer)[ RSS](/packages/rollingglory-yii2-image-optimizer/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Image Optimizer
====================

[](#yii2-image-optimizer)

A Yii2 helper for optimizing image using [spatie/image-optimizer](https://github.com/spatie/image-optimizer) library.

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

[](#installation)

1. Run the [Composer](http://getcomposer.org/download/) command to install the latest version:

```
composer require rollingglory/yii2-image-optimizer
```

Usage
-----

[](#usage)

From here, you could either use it directly like this:

```
\rollingglory\ImageOptimizer\Optimizer::optimize('@app/image.png');
```

And like this:

```
use \rollingglory\ImageOptimizer\Optimizer;

Optimizer::optimize('@app/image.png');
```

Or, define it as Yii2 component. At your config:

```
'components' => [
  'optimizer' => [
    'class' => 'rollingglory\ImageOptimizer\Optimizer',
  ],
],
```

Then use it like this:

```
Yii::$app->optimizer::optimize('@app/image.png')
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3183661?v=4)[Ben Nata](/maintainers/bentinata)[@bentinata](https://github.com/bentinata)

---

Top Contributors

[![bentinata](https://avatars.githubusercontent.com/u/3183661?v=4)](https://github.com/bentinata "bentinata (2 commits)")

### Embed Badge

![Health badge](/badges/rollingglory-yii2-image-optimizer/health.svg)

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

133890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

12644.1k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

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