PHPackages                             injex/yii2-easyimage - 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. injex/yii2-easyimage

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

injex/yii2-easyimage
====================

Image Component for Yii2

1.0.5(5y ago)0251↓50%MITPHP

Since Jul 13Pushed 5y agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (7)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 injex/yii2-easyimage

```

or add

```
"injex/yii2-easyimage": "^1.0"

```

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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~336 days

Recently: every ~420 days

Total

6

Last Release

1911d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5903789?v=4)[Pafnik](/maintainers/Pafnik)[@Pafnik](https://github.com/Pafnik)

---

Top Contributors

[![AxelPAL](https://avatars.githubusercontent.com/u/3734332?v=4)](https://github.com/AxelPAL "AxelPAL (7 commits)")[![Injex](https://avatars.githubusercontent.com/u/20755440?v=4)](https://github.com/Injex "Injex (6 commits)")[![git407](https://avatars.githubusercontent.com/u/10234065?v=4)](https://github.com/git407 "git407 (3 commits)")[![mauglee](https://avatars.githubusercontent.com/u/4603583?v=4)](https://github.com/mauglee "mauglee (1 commits)")

---

Tags

imageyii2

### Embed Badge

![Health badge](/badges/injex-yii2-easyimage/health.svg)

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

###  Alternatives

[raoul2000/yii2-jcrop-widget

This extension is a wrapper for the jQuery Image Cropping Plugin (jcrop)

10248.3k2](/packages/raoul2000-yii2-jcrop-widget)[noam148/yii2-image-resize

A Yii2 component for resizing images (on the fly)

1144.6k7](/packages/noam148-yii2-image-resize)[maxmirazh33/yii2-uploadable-cropable-image

Yii2 extension for upload and crop images

1020.8k](/packages/maxmirazh33-yii2-uploadable-cropable-image)[alex-bond/yii2-thumbler

Library for auto-creating thumbs of images

112.1k](/packages/alex-bond-yii2-thumbler)

PHPackages © 2026

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