PHP code example of lorddashme / php-image-squeezer
1. Go to this page and download the library: Download lorddashme/php-image-squeezer 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/ */
lorddashme / php-image-squeezer example snippets
include __DIR__ . '/vendor/autoload.php';
// Import the main class of the PHP Image Squeezer.
use LordDashMe\ImageSqueezer\ImageSqueezer;
// Initialize the main class.
$imageSqueezer = new ImageSqueezer();
// Load the necessary output file path of the compressed image.
$imageSqueezer->setOutputFilePath('/path/output-filename');
// Execute the image compression.
$imageSqueezer->compress();
txt
composer