PHP code example of wizzou / laravel-image-optimizer

1. Go to this page and download the library: Download wizzou/laravel-image-optimizer 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/ */

    

wizzou / laravel-image-optimizer example snippets


use Wizzou\ImageOptimizer\Facades\ImageOptimizer;

// Resize and optimize an image
$imageUrl = 'example.jpg';
$resizedImageUrl = ImageOptimizer::resize($imageUrl, 800, 600);
bash
php artisan vendor:publish --provider="Wizzou\ImageOptimizer\ImageOptimizerServiceProvider"