PHPackages                             maxmirazh33/yii2-uploadable-cropable-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. maxmirazh33/yii2-uploadable-cropable-image

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

maxmirazh33/yii2-uploadable-cropable-image
==========================================

Yii2 extension for upload and crop images

v2.2.5(6y ago)921.6k—6.1%9[5 issues](https://github.com/maxmirazh33/yii2-uploadable-cropable-image/issues)MITPHP

Since Feb 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/maxmirazh33/yii2-uploadable-cropable-image)[ Packagist](https://packagist.org/packages/maxmirazh33/yii2-uploadable-cropable-image)[ Docs](https://github.com/maxmirazh33/yii2-uploadable-cropable-image)[ RSS](/packages/maxmirazh33-yii2-uploadable-cropable-image/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (0)

Yii2 uploadable and cropable image
==================================

[](#yii2-uploadable-and-cropable-image)

Yii2 extension for upload and crop images

[![Latest Version](https://camo.githubusercontent.com/ee08f7392e420efd1737e1f7f2d429ea1281fcbe2fb90863cea1b48f8edf8d10/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d61786d6972617a6833332f796969322d75706c6f616461626c652d63726f7061626c652d696d6167652e7376673f7374796c653d666c61742d737175617265)](https://github.com/maxmirazh33/yii2-uploadable-cropable-image/releases)[![Software License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/maxmirazh33/yii2-uploadable-cropable-image/blob/master/LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/640cae68dd35c4b4a30b03165b274709478fbb1d01d289d76bf5f9ef1ae9406f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d61786d6972617a6833332f796969322d75706c6f616461626c652d63726f7061626c652d696d6167652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/maxmirazh33/yii2-uploadable-cropable-image)[![Total Downloads](https://camo.githubusercontent.com/a89501797fb6198caeab17154919362c0ee850bdebf0b88f4eacb25216fb6ba2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61786d6972617a6833332f796969322d75706c6f616461626c652d63726f7061626c652d696d6167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/maxmirazh33/yii2-uploadable-cropable-image)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist maxmirazh33/yii2-uploadable-cropable-image "*"

```

or add

```
"maxmirazh33/yii2-uploadable-cropable-image": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

In your model:

```
public function behaviors()
{
    return [
        [
            'class' => \maxmirazh33\image\Behavior::className(),
            'savePathAlias' => '@web/images/',
            'urlPrefix' => '/images/',
            'crop' => true,
            'attributes' => [
                'avatar' => [
                    'savePathAlias' => '@web/images/avatars/',
                    'urlPrefix' => '/images/avatars/',
                    'width' => 100,
                    'height' => 100,
                ],
                'logo' => [
                    'crop' => false,
                    'thumbnails' => [
                        'mini' => [
                            'width' => 50,
                        ],
                    ],
                ],
            ],
        ],
    //other behaviors
    ];
}
```

Use rules for validate attribute.

In your view file:

```
echo $form->field($model, 'avatar')->widget('maxmirazh33\image\Widget');
```

After, in your view:

```
echo Html::img($model->getImageUrl('avatar'));
echo Html::img($model->getImageUrl('logo', 'mini')); //get url of thumbnail named 'mini' for 'logo' attribute
```

If you use Advanced App Template and this behavior attached in backend model, then in frontend model add trait

```
use \maxmirazh33\image\GetImageUrlTrait
```

and use getImageUrl() method for frontend model too.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance9

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 97.1% 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 ~131 days

Recently: every ~410 days

Total

15

Last Release

2328d ago

Major Versions

v1.0.3 → v2.0.02015-02-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/4518ed87d5852b9540ead85bc84b4173de33fafcc0524dc80cfd3d625f8d65c5?d=identicon)[maxmirazh33](/maintainers/maxmirazh33)

---

Top Contributors

[![maxmirazh33](https://avatars.githubusercontent.com/u/2692282?v=4)](https://github.com/maxmirazh33 "maxmirazh33 (68 commits)")[![neizerth](https://avatars.githubusercontent.com/u/1821976?v=4)](https://github.com/neizerth "neizerth (2 commits)")

---

Tags

crop-imageyii2-extensionimageyii2extensionimage-cropImage uploadjcrop

### Embed Badge

![Health badge](/badges/maxmirazh33-yii2-uploadable-cropable-image/health.svg)

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

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.8k59](/packages/skeeks-cms)[yurkinx/yii2-image

Yii2 extension for image manipulating using Kohana Image Library.

66428.9k9](/packages/yurkinx-yii2-image)[noam148/yii2-image-resize

A Yii2 component for resizing images (on the fly)

1045.1k7](/packages/noam148-yii2-image-resize)[raoul2000/yii2-jcrop-widget

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

11270.3k2](/packages/raoul2000-yii2-jcrop-widget)[developit/yii2-jcrop

 yii2 image cropping extension

101.5k](/packages/developit-yii2-jcrop)

PHPackages © 2026

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