PHP code example of mostlyserious / craft-imgix-picture

1. Go to this page and download the library: Download mostlyserious/craft-imgix-picture 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/ */

    

mostlyserious / craft-imgix-picture example snippets




return [
    'imgixUrl' => getenv('IMGIX_URL'),
    'imgixApiKey' => getenv('IMGIX_API_KEY'),
    // altTextHandle => 'alternativeText' /* optional */
    // 'defaultParameters' => [] /* optional */
    // 'useNativeTransforms' => false
    // 'fallBackImageSrc' => '/static-assets/default-image-missing-photo.png'
];

    /* Defaults are */
    [
        'auto' => 'format,compress',
        'q' => 35,
        'fit' => 'max',
    ];