I got this code in yii2:
Image::thumbnail($path, 100, 100)->save($thumbnail, ['quality' => 50]);
I thought that it will resize the original image maintaining the aspect ratio. But it just creates a box... What can be wrong?
You may use like that:
use Imagine\Image\Box;
Image::frame($path)
->thumbnail(new Box(100, 100))
->save($thumbnail, ['quality' => 50]);