PHPackages                             shoxabbos/yii2-imagecrop - 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. shoxabbos/yii2-imagecrop

ActiveYii2-extension

shoxabbos/yii2-imagecrop
========================

Simple photo cropper

v2.0.0(8y ago)05761MITJavaScript

Since Aug 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Shoxabbos/yii2-imagecrop)[ Packagist](https://packagist.org/packages/shoxabbos/yii2-imagecrop)[ RSS](/packages/shoxabbos-yii2-imagecrop/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (1)

IMage Crop
==========

[](#image-crop)

Crop image with croppic.js lib

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist shoxabbos/yii2-imagecrop "*"

```

or add

```
"shoxabbos/yii2-imagecrop": "*"

```

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

Demo
----

[](#demo)

[![alt text](https://github.com/Shoxabbos/yii2-imagecrop/raw/master/demo.png)](https://github.com/Shoxabbos/yii2-imagecrop/blob/master/demo.png)

Usage
-----

[](#usage)

Add this action to your controller

```
public function actions()
{
    return [
        'crop' => [
            'class' => \shoxabbos\imagecrop\CropAction::className(),
            'width' => 900,
            'height' => 600,
            'whenCropped' => function () {
                // when file cropped!
            }
        ]
    ];
}
```

Add this code to your view file

```
\shoxabbos\imagecrop\CropWidget::widget([
    'action' => Url::to(['crop']),
    'image' => $model->photoUrl,
    'path' => Yii::getAlias('@webroot')."/".$model->photo,
    'ration' => '4 / 3',
]);
```

Developer Team

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Total

2

Last Release

3139d ago

Major Versions

v1.0.0 → v2.0.02017-08-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa672147eb465e2aab488eea53cfd004c486f00086b45c78d1dc8515300f6d59?d=identicon)[shoxabbos](/maintainers/shoxabbos)

---

Top Contributors

[![shoxabbos](https://avatars.githubusercontent.com/u/8403807?v=4)](https://github.com/shoxabbos "shoxabbos (15 commits)")

---

Tags

yii2extensionimagecrop

### Embed Badge

![Health badge](/badges/shoxabbos-yii2-imagecrop/health.svg)

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

###  Alternatives

[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1356.4k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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