webvimark/cropper Cropper for Yii 2

Cropper for Yii 2

Image cropper

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist webvimark/cropper "*"

or add

"webvimark/cropper": "*"

to the require section of your composer.json file.

Usage

<?= Cropper::widget([
    'acceptUrl'     => Url::to(['/slider/slider-image/crop']),
    'fileInputName' => 'cropperFileUpload',
    'imageSelector' => '#slider-image',
    'resultSize'    => array($model->slider->width, $model->slider->height),
    'cropParams'=>array(
//      'minSize'     => array($model->slider->width, $model->slider->height),
        'setSelect'   => array(0,0,$model->slider->width, $model->slider->height),
        'aspectRatio' => $model->slider->width/$model->slider->height,
    ),
    'customParams'=>array(
        'modelId'=>$model->id,
    ),
]) ?>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

No stable releases.

Comments



No stable releases.



Unknown license
Stats
0 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
23 total downloads