PHP code example of simpsyst / thumbcrop

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

    

simpsyst / thumbcrop example snippets



 new \SimpSyst\Thumbcrop\Thumbcrop("patch/to/cache");

echo "<img src='{$c->make("images/image.jpg", 500)}' alt='Happy SimpSyst' title='Happy SimpSyst'>";
echo "<img src='{$c->make("images/image.jpg", 500, 300)}' alt='Happy SimpSyst' title='Happy SimpSyst'>";


 new \SimpSyst\Thumbcrop\Thumbcrop("patch/to/cache");

//flush by filename
$c->flush("images/image.jpg");

//flush cache folder
$c->flush();