PHP code example of algsupport / yii2-glide

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

    

algsupport / yii2-glide example snippets


'components' => [
    ...
    'glide' => [
        'class' => 'trntv\glide\components\Glide',
        'sourcePath' => '@app/web/uploads',
        'cachePath' => '@runtime/glide',
        'signKey' => '<random-key>' // "false" if you do not want to use HTTP signatures
    ],
    ...
]

Yii::$app->glide->outputImage('new-upload.jpg', ['w' => 100, 'fit' => 'crop'])

public function actions()
{
    return [
        'glide' => 'trntv\glide\actions\GlideAction'
    ]
}