Hi guys i'm using this plugin for file upload 2amigos/yii2-file-upload-widget based on BlueImp jQuery File Upload plugin.
Like in the guide i configured all right and all actions work well but i have a question.
- Is there an option for resize an uploaded image?
When i upload an image from the queue files(third image in the example) that image is returned in original size and not in a small size. Is there an option for resize the already uploaded image like first and second images that are in the queue?
I think there is a clientOption
for this but I can not find anything.
Help me guys!
Widget configuration:
<?= \dosamigos\fileupload\FileUploadUI::widget([
'model' => $model,
'attribute' => 'image',
'url' => ['site/image-upload'],
'fieldOptions' => [
'accept' => 'image/*'
],
'clientOptions' => [
'maxFileSize' => 2000000,
],
'clientEvents' => [
'fileuploaddone' => 'function(e, data) {
console.log(e);
console.log(data);
}',
'fileuploadfail' => 'function(e, data) {
console.log(e);
console.log(data);
}',
],
]); ?>