PHP code example of gevman / azure-thumbnails

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

    

gevman / azure-thumbnails example snippets




$generator = new \Gevman\Thumbnails\Generator('{Computer Vision API key}');

$thumb = $generator->thumbnail('/full/path/to/original.jpg', 1000, 500);

//will save thumbnail to specified path
$thumb->saveAs('/full/path/to/thumbnail.jpg', 100);

//will show thumbnail
$thumb->show();