PHP code example of daneren2005 / fasterimage

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

    

daneren2005 / fasterimage example snippets



        $client = new \FasterImage\FasterImage();
        
        $images = $client->batch([
            'http://wwww.example.com/image1.jpg',
            'http://wwww.example.com/image2.gif',
            'http://wwww.example.com/image3.png',
            'http://wwww.example.com/image4.bmp',
            'http://wwww.example.com/image5.tiff',
            'http://wwww.example.com/image6.psd',
            'http://wwww.example.com/image7.webp',
            'http://wwww.example.com/image8.ico',
            'http://wwww.example.com/image9.cur'
        ]);
        
        foreach ($images as $image) {
            list($width,$height) = $image['size'];
        }