| State | Description |
|---|---|
| Build | |
| Coverage | |
| License | MIT |
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.
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
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,
]);
}
}
For more detailed and configured use cases, please refer to the documentation.
To contribute to the Image Cropper Bundle, follow these steps:
Please ensure your code follows the project's coding standards and includes appropriate tests, if applicable.
How can I help you explore Laravel packages today?