PHP code example of tobimori / kirby-magick-extended

1. Go to this page and download the library: Download tobimori/kirby-magick-extended 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/ */

    

tobimori / kirby-magick-extended example snippets


// site/config/config.php

return [
  'thumbs.driver' => 'im-extended',
];

// In your template file

 if($image = $page->animated()->toFile()) :
  $thumbOptions = [
    'width' => 100,
    'height' => 100,
    'frame' => 0, // specify frame index
    'format' => 'png',
  ]; 

// In your template file

 if($image = $page->animated()->toFile()) :
  $thumbOptions = [
    'width' => 100,
    'height' => 100,
    'apng' => false, // disable APNG detection
    'format' => 'png',
  ]; 

// site/config/config.php
return [
  'thumbs' => [
    'identifyBin' => 'identify',
  ],
];