PHPackages                             insitaction/easycrop - 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. insitaction/easycrop

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

insitaction/easycrop
====================

1.0.5(2y ago)11.1k2MITTypeScript

Since Aug 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Altavia-Insitaction/EasyCropBundle)[ Packagist](https://packagist.org/packages/insitaction/easycrop)[ RSS](/packages/insitaction-easycrop/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (8)Used By (0)

[![Insitaction](https://camo.githubusercontent.com/8eeceeb3af78b8b9debf0f2499a4d47acb9a28b199b1a642b7fee068da261fac/68747470733a2f2f7777772e696e736974616374696f6e2e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032322f30392f6c6f676f2e706e67)](https://camo.githubusercontent.com/8eeceeb3af78b8b9debf0f2499a4d47acb9a28b199b1a642b7fee068da261fac/68747470733a2f2f7777772e696e736974616374696f6e2e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032322f30392f6c6f676f2e706e67)

EasyCrop Bundle
===============

[](#easycrop-bundle)

[![EasycropBundle](./doc/easycrop.png)](./doc/easycrop.png)

The EasyCrop Bundle is a specialized Symfony bundle designed to seamlessly enhance the image handling capabilities of [EasyAdmin](https://github.com/EasyCorp/EasyAdminBundle). This bundle offers a straightforward way to integrate image uploading, cropping, and resizing functionalities into your application. At its core, the EasyCrop Bundle introduces a custom field type named `CropField`, meticulously crafted to bring cropping and resizing functionalities to your EasyAdmin-powered application. This field type, built upon the foundation of `EasyCorp\Bundle\EasyAdminBundle\Field\ImageField`, adds the convenience of image cropping while maintaining compatibility with the core classes of [EasyAdmin](https://github.com/EasyCorp/EasyAdminBundle)

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

[](#installation)

You can install the EasyCrop Bundle using Composer:

```
composer require insitaction/easycrop
```

Features
--------

[](#features)

The primary feature of this bundle is the `CropField`, which enables users to upload images and crop them to their desired dimensions. The core functionality is achieved through the `CropType` form type, a variation of the `EasyCorp\Bundle\EasyAdminBundle\Form\Type\FileUploadType`. The key distinction is that `CropType` incorporates additional logic through a Stimulus controller.

> ⚠️ The multiple option is currently not supported by `CropField`.

Usage
-----

[](#usage)

1. Add to bundle.php

```
#bundles.php

return [
    Insitaction\EasyCropBundle\EasyCropBundle::class => ['all' => true],
    Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
];
```

2. Load form theme in Easyadmin

```
    public function configureCrud(): Crud
    {
        return parent::configureCrud()
            ->addFormTheme('@EasyCrop/form_theme.html.twig')
            ;
    }
```

3Add the CropField to your EasyAdmin configuration:

```
use Insitaction\EasyCropBundle\Field\CropField;

// ...

yield CropField::new('image', 'Image')
    ->setBasePath('/uploads/images/')
    ->setUploadDir('public/uploads/images/')
    ->setFormat('WEBP') // choices are 'PNG', 'JPEG', 'WEBP'.
    ->enableSizeValidation(true) // enable min size validation
    ->enableResize(true) // enable resize
    ->setHeight(600) // Set the desired height for resizing or validation
    ->setWidth(800)  // Set the desired width for resizing or validation
;
```

The `CropField` integrates seamlessly into your existing EasyAdmin configuration, allowing users to upload images and crop them directly within the form. Behind the scenes, the `CropType` form type utilizes a Stimulus controller that interacts with react-cropper to facilitate image cropping. Once the user selects the desired crop area, the controller converts the cropped image into a Base64 string representation.

TODO
----

[](#todo)

### Symfony Validation:

[](#symfony-validation)

Symfony validation is not yet implemented but will be introduced in a future version.

### Multiple upload/crop:

[](#multiple-uploadcrop)

The multiple option is currently not supported by `CropField` but will be introduced in a future version.

Versions
--------

[](#versions)

PHP versionSymfony versionComposer flags8.26.x / 7.xContributing
------------

[](#contributing)

If you encounter any issues or would like to contribute to the EasyCrop Bundle, feel free to create a pull request or submit an issue on the GitHub repository.

License
-------

[](#license)

The EasyCrop Bundle is open-source software licensed under the MIT license.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Total

6

Last Release

897d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/96786948?v=4)[Insitaction](/maintainers/Insitaction)[@Insitaction](https://github.com/Insitaction)

---

Top Contributors

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

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/insitaction-easycrop/health.svg)

```
[![Health](https://phpackages.com/badges/insitaction-easycrop/health.svg)](https://phpackages.com/packages/insitaction-easycrop)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[symfony/ux-chartjs

Chart.js integration for Symfony

1003.2M18](/packages/symfony-ux-chartjs)[shopware/storefront

Storefront for Shopware

684.2M148](/packages/shopware-storefront)

PHPackages © 2026

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