PHP code example of pstaender / high-quality-low-size-image-for-kirby

1. Go to this page and download the library: Download pstaender/high-quality-low-size-image-for-kirby 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/ */

    

pstaender / high-quality-low-size-image-for-kirby example snippets


<?= $page->someImage()->toFile()->highQualityLowSize() 

[
    'high_quality_and_low_size_image' => [
        'image_tag' => true,
    ],
]

[
    'high_quality_and_low_size_image' => [
        'excluded_image_formats' => [
            // 'avif', 'webp', …
        ],
    ],
]