Download the PHP package softark/yii2-cropper-bs5 without Composer
On this page you can find all versions of the php package softark/yii2-cropper-bs5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-cropper-bs5
yii2-cropper-bs5
Yii2 Image Cropper Input Widget for bootstrap 5
Features
This is a wrapper of fengyuanchen/Cropper.js. It provides the following feature:
- Crop
- Image Rotate
- Image Flip
- Image Zoom
- Coordinates
- Image Sizes Info
- Base64 Data
- Set Image.Url Directly
- Set Image.Src With Javascript
Difference from bilginnet/yii2-cropper
This is a fork of bilginnet/yii2-cropper, but it has some important difference:
- Works with bootstrap 5
- Improved UI design of the modal
- Supports the latest version of Cropper.js through composer
- Backward incompatibility
- Doesn't work with bootstrap 3
- Some incompatibility in the options
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Usage
1) Add aliases for image directory
Add aliases for the directory to store the images in your config file.
2) Extend model to handle image data from cropper
Add a virtual attribute for the image data from the cropper widget in your model.
And write a function to save the image data from the cropper widget to a file.
3) Place cropper in _form file
The following is a typical code that uses the cropper in _form file:
Options
While many options are supported for the widget, usually you can safely ignore them to accept the default values.
See Options in Detail for reference.
All versions of yii2-cropper-bs5 with dependencies
bower-asset/cropperjs Version ~1.5
bower-asset/jquery-cropper Version ~1.0
yiisoft/yii2 Version *
yiisoft/yii2-bootstrap5 Version *