PHPackages                             specialist/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. [Image &amp; Media](/categories/media)
4. /
5. specialist/yii2-cropper

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

specialist/yii2-cropper
=======================

Yii2 framework widget for uploading and cropping images

053PHP

Since Jan 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Specialist001/yii2-cropper)[ Packagist](https://packagist.org/packages/specialist/yii2-cropper)[ RSS](/packages/specialist-yii2-cropper/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Cropper
============

[](#yii2-cropper)

Yii-Framework extension for uploading and cropping images.

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

[](#installation)

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

Either run

```
composer require specialist/yii2-cropper "dev-master"

```

or add

```
"specialist/yii2-cropper": "dev-master"

```

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

Usage
-----

[](#usage)

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

```
use specialist\cropper\CropperWidget;

```

```

```

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:

```
use specialist\cropper\actions\UploadAction;

```

```
public function actions()
{
    return [
        'upload-photo' => [
            'class' => UploadAction::className(),
            'url' => '../../uploads/',  //you must create 'uploads' directory in your root directory -> '../../uploads/categories/'
            'path' => '../../uploads/', //you must create 'uploads' directory in your root directory
        ]
    ];
}

```

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)1No

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fdce5757f4172b2b3568499beeb6c734f1f86c518176b47ca8b2a359ba77f0c?d=identicon)[Specialist001](/maintainers/Specialist001)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)

PHPackages © 2026

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