PHPackages                             hustshenl/yii2-cropper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hustshenl/yii2-cropper

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

hustshenl/yii2-cropper
======================

Enhanced Yii2 wrapper for the Cropper jQuery plugin (sub repo split from yii2-widgets).

0.1.2(6y ago)161BSD-3-ClauseJavaScript

Since Mar 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hustshenl/yii2-widget-cropper)[ Packagist](https://packagist.org/packages/hustshenl/yii2-cropper)[ Docs](https://github.com/hustshenl/yii2-widget-cropper)[ RSS](/packages/hustshenl-yii2-cropper/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

yii2-widget-cropper
===================

[](#yii2-widget-cropper)

[![Latest Stable Version](https://camo.githubusercontent.com/98bdb2f80bab38ce208200d7fdcf58bafe2cd94d37ef9f6895add56eceaf973a/68747470733a2f2f706f7365722e707567782e6f72672f687573747368656e6c2f796969322d7769646765742d63726f707065722f762f737461626c65)](https://packagist.org/packages/hustshenl/yii2-widget-cropper)[![License](https://camo.githubusercontent.com/5c6705117c7453133c604340be5e863a8e975021fdb46d1d4a347f2c0ca31fda/68747470733a2f2f706f7365722e707567782e6f72672f687573747368656e6c2f796969322d7769646765742d63726f707065722f6c6963656e7365)](https://packagist.org/packages/hustshenl/yii2-widget-cropper)[![Total Downloads](https://camo.githubusercontent.com/162a540db5b7826f6d7cdfda9c0d11c2dee377085beb477c746222f6e3dd7f87/68747470733a2f2f706f7365722e707567782e6f72672f687573747368656e6c2f796969322d7769646765742d63726f707065722f646f776e6c6f616473)](https://packagist.org/packages/hustshenl/yii2-widget-cropper)[![Monthly Downloads](https://camo.githubusercontent.com/d95f1d3a40c9aa11b58727a3538dbf6d06afeb244e180a55544abad1d94a4f12/68747470733a2f2f706f7365722e707567782e6f72672f687573747368656e6c2f796969322d7769646765742d63726f707065722f642f6d6f6e74686c79)](https://packagist.org/packages/hustshenl/yii2-widget-cropper)[![Daily Downloads](https://camo.githubusercontent.com/a528c3b9b89b202357989df2f3ce7f53929e4f2e45151316158995f9d284f0b8/68747470733a2f2f706f7365722e707567782e6f72672f687573747368656e6c2f796969322d7769646765742d63726f707065722f642f6461696c79)](https://packagist.org/packages/hustshenl/yii2-widget-cropper)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/hustshenl/yii2-widget-cropper/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

To install, either run

```
$ php composer.phar require hustshenl/yii2-widget-cropper "@dev"

```

or add

```
"hustshenl/yii2-widget-cropper": "@dev"

```

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

Usage
-----

[](#usage)

In View

```
echo Form::widget([ // continuation fields to row above without labels
    'model' => $model,
    'form' => $form,
    'columns' => 1,
    'attributes' => [
        'cover' => [
            'type' => Form::INPUT_WIDGET,
            'widgetClass' => '\hustshenl\cropper\Cropper',
            'options' => [
                'data' => '',
                'pluginOptions' => [
                    'aspectRatio' => 240 / 320,
                    'autoCropArea' => 1,
                    'preview' => '.img-preview',
                    'strict' => true,
                    'guides' => false,
                    'highlight' => true,
                    'dragCrop' => true,
                    'cropBoxMovable' => true,
                    'cropBoxResizable' => true,
                ],
            ]
        ],
    ]
]);

```

In Model

```
$image = UploadedFile::getInstance($this, 'cover');
$cropper = $this->cover_crop

```

License
-------

[](#license)

**yii2-widget-cropper** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Every ~694 days

Total

3

Last Release

2368d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8bd411c58e280d56847c4d3649e2dec5b5d8f8ae313889ff683f8bff8e0ec23?d=identicon)[Shen.L](/maintainers/Shen.L)

---

Top Contributors

[![hustshenl](https://avatars.githubusercontent.com/u/9306187?v=4)](https://github.com/hustshenl "hustshenl (10 commits)")

---

Tags

pluginjqueryyii2extensionwidgetformcropper

### Embed Badge

![Health badge](/badges/hustshenl-yii2-cropper/health.svg)

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

###  Alternatives

[kartik-v/yii2-widget-datepicker

Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).

1177.3M63](/packages/kartik-v-yii2-widget-datepicker)[kartik-v/yii2-widget-datetimepicker

Enhanced Yii2 wrapper for the bootstrap datetimepicker plugin (sub repo split from yii2-widgets)

1146.8M49](/packages/kartik-v-yii2-widget-datetimepicker)[kartik-v/yii2-widget-depdrop

Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets)

845.2M18](/packages/kartik-v-yii2-widget-depdrop)[kartik-v/yii2-widget-typeahead

Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).

475.1M9](/packages/kartik-v-yii2-widget-typeahead)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

445.2M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

474.3M8](/packages/kartik-v-yii2-widget-rating)

PHPackages © 2026

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