PHPackages                             odilov-sh/yii2-image-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. odilov-sh/yii2-image-cropper

ActiveYii2-extension

odilov-sh/yii2-image-cropper
============================

Yii2 image cropper with deleting old image

1.1(5y ago)094↓100%BSD-3-ClausePHP

Since Sep 12Pushed 5y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Image Cropper
=============

[](#image-cropper)

Yii-Framework extension for uploading and cropping images based on [Cropper extension](https://github.com/krivochenko/yii2-cropper/)

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

[](#installation)

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

Either run

```
php composer.phar require odilov-sh/yii2-image-cropper "@dev"

```

or add

```
"odilov-sh/yii2-image-cropper": "@dev"

```

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

Usage
-----

[](#usage)

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

```
use odilov\cropper\Cropper;

```

```

```

Widget has following properties:

NameDescriptionDefaultRequireduploadParameterUpload parameter namefileNowidthThe final width of the image after cropping200NoheightThe final height of the image after cropping200NolabelHint in box for previewIt depends on application language. You can translate this message on your language and make pull-request.NouploadUrlURL for uploading and cropping imageYesnoPhotoImageThe picture, which is used when a photo is not loaded.You can see it on screenshots in this instructionsNomaxSizeThe maximum file size (kb).2097152NocropAreaWidthWidth box for preview300NocropAreaHeightHeight box for preview300NoaspectRatioFix aspect ratio of cropping areanullNoextensionsAllowed file extensions (string).jpeg, jpg, png, gifNoIn UserController:

```
public function actions()
{
    return [
        'uploadPhoto' => [
            'class' => 'odilov\cropper\UploadAction',
            'url' => 'http://your_domain.com/uploads/user/photo',
            'path' => '@frontend/web/uploads/user/photo',
        ]
    ];
}

```

Action has following parameters:

NameDescriptionDefaultRequiredpathPath for saving image after crippingYesurlURL to which the downloaded images will be available.YesuploadParameterUpload parameter name. It must match the value of a similar parameter of the widget.fileNomaxSizeThe maximum file size (kb). It must match the value of a similar parameter of the widget.2097152NoextensionsAllowed file extensions (string). It must match the value of a similar parameter of the widget.jpeg, jpg, png, gifNowidthThe final width of the image after cropping. It must match the value of a similar parameter of the widget.200NoheightThe final height of the image after cropping. It must match the value of a similar parameter of the widget.200NojpegQualityQuality of cropped image (JPG)100NopngCompressionLevelQuality of cropped image (PNG)1NodeleteOldImageWhether delete old image after cropping new image or clicking "Delete image" buttontrueNoYou can use this widget on frontend and backend. For example: user can change his userpic and administrator can change users userpic.

For more information refer

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

2068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92efeb5b89501e0b28beab3d111c1a763c21355ca3af9cb813724f134c32db11?d=identicon)[Shukurullo](/maintainers/Shukurullo)

---

Top Contributors

[![odilov-sh](https://avatars.githubusercontent.com/u/52707367?v=4)](https://github.com/odilov-sh "odilov-sh (13 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/odilov-sh-yii2-image-cropper/health.svg)

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

###  Alternatives

[skeeks/cms

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

13825.6k47](/packages/skeeks-cms)[budyaga/yii2-users

Module for manage users and their rights with the support of registration through social services and assigned to each user more than one social service.

409.1k](/packages/budyaga-yii2-users)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

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

PHPackages © 2026

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