PHP code example of hectorprats / php-image-converter

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

    

hectorprats / php-image-converter example snippets


echo \ImageConverter\convert(string $from , string $to , int $quality);


m = __DIR__ . '/my-image.png';
$to = __DIR__ . '/my-image.webp';

echo \ImageConverter\convert($from, $to);