PHP code example of alex-bond / yii2-thumbler
1. Go to this page and download the library: Download alex-bond/yii2-thumbler library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alex-bond / yii2-thumbler example snippets
return [
//....
'components' => [
'thumbler'=> [
'class' => 'alexBond\thumbler\Thumbler',
'sourcePath' => '/path/to/source/files',
'thumbsPath' => '/path/to/resize/cache',
],
],
];
$path = \Yii::$app->thumbler->resize('image.png',500,500);