PHP code example of compressmyphotos / image

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

    

compressmyphotos / image example snippets


return [
    'api_url' => env('COMPRESS_MY_PHOTOS_API_URL', 'https://api.compressmyphotos.com'),
    'api_key' => env('COMPRESS_MY_PHOTOS_API_KEY'),
    'default_quality' => env('COMPRESS_MY_PHOTOS_DEFAULT_QUALITY', 75),
    'default_format' => env('COMPRESS_MY_PHOTOS_DEFAULT_FORMAT', 'webp'),
];
bash
php artisan vendor:publish --provider="CompressMyPhotos\Image\CompressMyPhotosServiceProvider" --tag="config"