PHPackages                             flaviovs/yii2-croppie - 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. flaviovs/yii2-croppie

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

flaviovs/yii2-croppie
=====================

Yii2 + Croppie integration extension

1.0.0-rc3(7y ago)19.2k↓21.3%1MITPHPPHP &gt;=5.6.0

Since Nov 14Pushed 2y ago2 watchersCompare

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

READMEChangelogDependencies (2)Versions (4)Used By (0)

Yii2 + Croppie integration Extension
====================================

[](#yii2--croppie-integration-extension)

This extension integrates [Croppie](https://foliotek.github.io/Croppie/) with Yii2 apps. It provides assets and a widget to facilitate uploads of cropped images.

Usage
-----

[](#usage)

Yii2-Croppie provides an widget plus an upload file class that inherits from [yii\\web\\UploadedFile](https://www.yiiframework.com/doc/api/2.0/yii-web-uploadedfile). That allows you to use native semantics for uploading files with this extension.

On your model
-------------

[](#on-your-model)

```
class Form extends \yii\base\Model
{
    public $image;

    public function rules()
    {
        return [
            ['image', 'image', 'enableClientValidation' => FALSE],
        ];
    }
}
```

**IMPORTANT**: If you use `image` validation in your model (recommended), you **must** disable client validation, as shown above.

In your view
------------

[](#in-your-view)

```
$form->field($model, 'image')
    ->widget(\fv\yii\croppie\Widget::class)
```

In your controller
------------------

[](#in-your-controller)

```
if ($app->request->isPost) {
   $form->image = \fv\yii\croppie\UploadedFile::getInstance($form, 'image');

   if ($form->validate())
   {
        $name = '/tmp/' . $form->image->baseName
            . '.' . $form->image->extension;

        $form->image->saveAs($name);
        $app->session->setFlash('success',
            'Saved to ' . Html::encode($name));
        return $this->refresh();
    }
}
```

Notes
-----

[](#notes)

No actual file upload by the browser happens. Consequently, the extension never gets to know the name of the file that got sent for cropping, and for compatibility with `yii\web\UploadedFile`, a random name is generated.

Issues
------

[](#issues)

See

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~60 days

Total

3

Last Release

2669d ago

### Community

Maintainers

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

---

Top Contributors

[![flaviovs](https://avatars.githubusercontent.com/u/1832699?v=4)](https://github.com/flaviovs "flaviovs (8 commits)")[![evghenin](https://avatars.githubusercontent.com/u/1652759?v=4)](https://github.com/evghenin "evghenin (1 commits)")

### Embed Badge

![Health badge](/badges/flaviovs-yii2-croppie/health.svg)

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

###  Alternatives

[symfony/service-contracts

Generic abstractions related to writing services

2.6k914.7M606](/packages/symfony-service-contracts)[henck/rtf-to-html

RTF to HTML converter in PHP

108868.1k1](/packages/henck-rtf-to-html)

PHPackages © 2026

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