PHP code example of jancyril / glide-for-laravel

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

    

jancyril / glide-for-laravel example snippets


'providers' => [
    JanCyril\Glide\GlideServiceProvider::class,
];

$this->glide->image($imagePath)
            ->resize(200,200)
            ->save($outputFile);

$this->glide->image($imagePath)
            ->addWatermark($watermarkImage)
            ->save($outputFile);

$parameters = [
    'w' => 200,
    'h' => 200,
    'fit' => fill,
];

$this->glide->image($imagePath)
            ->manipulate($parameters)
            ->save($outputFile);