Image extension for Yii2
The preferred way to install this extension is through composer.
Either run
php composer.phar require 'andreosoft/yii2-image'
or add
"andreosoft/yii2-image": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
....
\Yii::getAlias('@root'), 'webroot' => 'http://mysite.com/uploads', 'quality' => 50, ]; echo Image::thumb('test-image.jpg', 120, 120) ?>