ajroudsoftwares / image-cropper
image cropper Bundle for Symfony
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.3
- symfony/form: ^7.1|^7.2
- symfony/framework-bundle: ^7.1|^7.2
- symfony/twig-bundle: ^7.1|^7.2
- symfony/validator: ^7.1|^7.2
This package is auto-updated.
Last update: 2025-05-26 02:14:13 UTC
README
State | Description |
---|---|
Build | |
Coverage | |
License | MIT |
Introduction
The Image Cropper Bundle provides a custom form type that allows you to add a powerful image cropper to your Symfony forms, by integrating cropperjs.
Installation
To install the Image Cropper Bundle, use Composer:
composer require ajroudsoftwares/image-cropper
and then if you don't have "assets:install" script in your composer.json file, run it manually like this:
php bin/console assets:install
Usage
Image Cropper Type
The ImageCropperType
form type allows you to add an image cropper to your forms. Here is an example of how to use it:
use AjroudSoftwares\ImageCropperBundle\Form\ImageCropperType; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\Form\FormBuilderInterface; class YourFormType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('image', ImageCropperType::class, [ 'label' => 'Upload and Crop Image', 'required' => true, ]); } }
Documentation
For more detailed and configured use cases, please refer to the documentation.
Contribute
To contribute to the Image Cropper Bundle, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them.
- Push your changes to your fork.
- Create a pull request to the main repository.
Please ensure your code follows the project's coding standards and includes appropriate tests, if applicable.