PHP code example of codeurs / imagehelper
1. Go to this page and download the library: Download codeurs/imagehelper 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/ */
codeurs / imagehelper example snippets
use Codeurs\ImageHelper;
// Set the cache folder location
ImageHelper::setCacheFolder('cache/images');
// Resize an image and return the cached file location
$src = ImageHelper::fromPath('assets/image.png')
->resize(320, 240)
->src();