1. Go to this page and download the library: Download croxton/imgixer 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/ */
croxton / imgixer example snippets
return [
'sources' => array(
// A unique handle that you can reference in your templates.
'myHandle' => array(
// Provider: either 'imgix', 'imagekit' or 'servd' (defaults to 'imgix')
'provider' => 'imgix',
// The image service endpoint or source domain
'endpoint' => 'my-domain.imgix.net',
// Optionally specify a subfolder path to prefix the path
// of generated URLs after the source domain.
'subfolder' => '',
// The private key used to sign images.
// Imgix: get this from the source details screen at https://imgix.com
// Imagekit: https://imagekit.io/dashboard/developer/api-keys
// Servd: not > 'https://ik.imagekit.io/render/my-identifier',
'privateKey' => '12345',
'publicKey' => '67890',
'signed' => true,
'defaultParams' => array(
'auto' => 'compress,format',
'fit' => 'crop',
'ar' => '16:9',
'q' => '80'
)
),
'portraits' => array(
'provider' => 'imgix',
'endpoint' => 'another-domain.imgix.net',
'privateKey' => '12345',
'signed' => true,
'defaultParams' => array(
'auto' => 'compress,format,enhance,redeye',
'fit' => 'facearea',
'ar' => '3:4'
)
),
// Optional: define a source to use in place of Craft's native image transforms.
// This will be used for all transforms used in your templates and in the control panel.
'assetTransforms' => array(
'provider' => 'imgix',
'endpoint' => 'my-domain.imgix.net',
'privateKey' => '12345',
'signed' => true
),
),
// Optional: set this to the source you want to use in place of Craft's native image transforms.
'transformSource' => 'assetTransforms'
];