PHP code example of descom / image-x
1. Go to this page and download the library: Download descom/image-x 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/ */
descom / image-x example snippets
use Descom\ImageX\ImageX;
return ImageX::from($filename)
->transform('w_200,h_200,bg_000000')
->auto() // Auto format to image; webp, jpg
->response(); // ->save($otherFilename);