Answer the question
In order to leave comments, you need to log in
How to save a behever after a crop?
Good afternoon,
on the project I use Behever to save photos. ImageUploadBehavior suits me with everything.
now my task is to make a kopilnik, the choice fell on croppie, everything, as it were, was done, it cuts.
And here the complexity itself means, I need to save 5 files
1 - original,
2 - clipping from crop
3 - save 4 files with crop of the size I need.
The bihever does not have a spit, so that's the question.
That's not how I can't figure out how I can use the behever to save.
It is convenient and you do not want to produce a bunch of functions. Thank you all for your help!
https://foliotek.github.io/Croppie/
https://github.com/yii-dream-team/yii2-upload-behavior
Answer the question
In order to leave comments, you need to log in
Derivate from it and add/change methods when saving images.
In particular:
/**
* After file save event handler.
*/
public function afterFileSave()
{
if ($this->createThumbsOnSave == true)
$this->createThumbs();
}
/**
* After file save event handler.
*/
public function createThumbs()
{
//...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question