PHPackages                             cliff363825/yii2-image - 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. cliff363825/yii2-image

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

cliff363825/yii2-image
======================

Image Component for Yii2

33.2k6PHP

Since Sep 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cliff363825/yii2-image)[ Packagist](https://packagist.org/packages/cliff363825/yii2-image)[ RSS](/packages/cliff363825-yii2-image/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Image Component for Yii2
========================

[](#image-component-for-yii2)

Image Component for Yii2

This extension is base on [yii-easyImage](https://github.com/zhdanovartur/yii-easyimage), used for Yii2.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist cliff363825/yii2-image "*"

```

or add

```
"cliff363825/yii2-image": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply modify your application configuration as follows:

```
return [
    ...
    'components' => [
        ....
        'easyImage' => [
            'class' => 'cliff363825\image\EasyImage',
            'driver' => 'GD',
            'quality' => 100,
            'cachePath' => '/easyimage/',
            'cacheTime' => 2592000,
            'retinaSupport' => false,
            'basePath' => '@webroot',
            'baseUrl' => '@web',
        ]
    ],
];
```

\####Parameters

- string `$file` required - Image file path
- string `$driver` - Driver: `GD`, `Imagick`

### ThumbOf

[](#thumbof)

You can create a thumbnail directly in the `View`:

// Create and autocache

```
Yii::$app->easyImage->thumbOf('/path/to/image.jpg', ['rotate' => 90]);
```

// or

```
Yii::$app->easyImage->thumbOf('image.jpg', ['rotate' => 90],  ['class' => 'image']);
```

// or

```
Yii::$app->easyImage->thumbOf('image.png', [
    'resize' => ['width' => 100, 'height' => 100],
    'rotate' => ['degrees' => 90],
    'sharpen' => 50,
    'background' => '#ffffff',
    'type' => 'jpg',
    'quality' => 60,
  ]);
```

**Note.** This method return [Html::img()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html)

\####Parameters

- string `$file` required - Image file path
- array `$params` - Image manipulation methods. See [Methods](README.md#methods)
- array `$htmlOptions` - options for Html::img()

For full details on usage, see the [documentation](https://github.com/zhdanovartur/yii-easyimage).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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://www.gravatar.com/avatar/11502c11de71560b1db76dca8e0793998f9afff90c555fc414e15a1856f44c75?d=identicon)[cliff363825](/maintainers/cliff363825)

### Embed Badge

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

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)

PHPackages © 2026

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