1. Go to this page and download the library: Download acalvino4/craft-easy-image 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/ */
acalvino4 / craft-easy-image example snippets
use acalvino4\easyimage\models\Settings;
use acalvino4\easyimage\models\TransformSet as TS;
return get_object_vars(new Settings(
transformSets: [
'hero' => new TS(
widths: [2560, 1280],
aspectRatio: 2 / 1,
),
'hero-mobile' => new TS(
widths: [640, 320],
aspectRatio: 1 / 2,
),
'thumbnail' => ...
'catalog-item' => ...
],
));