1. Go to this page and download the library: Download martijnvdb/php-image-resize 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/ */
martijnvdb / php-image-resize example snippets
composer
use Martijnvdb\ImageResize\ImageResize;
$image = new ImageResize(__DIR__ . '/image-1.jpg');
$image = new ImageResize(__DIR__ . '/image-1.jpg');
$image->export(__DIR__ . '/resized/image-1.webp');