PHP code example of maddoger / yii2-imagecache

1. Go to this page and download the library: Download maddoger/yii2-imagecache 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/ */

    

maddoger / yii2-imagecache example snippets


php composer.phar 

'imageCache' => [
    'class' => 'maddoger\imagecache\ImageCache',
    'generateWithUrl' => false,
    'actionSavesFile' => false,

    //Avatar
    'presets' => [
        '100x100' => [
            'fit' => [
                'width' => 100,
                'height' => 100,
            ],
        ],
        '200x' => [
            'thumbnail' => [
                'width' => 200,
                'height' => 200,
            ],
        ],
    ],
],

public function actions()
    {
        return [
            'imagecache' => [
                'class' => 'maddoger\imagecache\ImageAction',
            ],
        ];
    }