PHP code example of baptiste / kirby-image-block
1. Go to this page and download the library: Download baptiste/kirby-image-block 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/ */
baptiste / kirby-image-block example snippets
'thumbs' => [
'presets' => [
'default' => ['width' => 1400, 'height' => 1400, 'quality' => 60],
'xl' => ['width' => 1200, 'height' => 1200, 'quality' => 60],
'md' => ['width' => 600, 'height' => 600, 'quality' => 60],
'sm' => ['width' => 300, 'height' => 300, 'quality' => 60],
'xs' => ['width' => 160, 'height' => 160, 'quality' => 60],
],
'srcsets' => [
'default' => [
'1x' => ['width' => 800, 'height' => 800, 'quality' => 60,'format' => 'webp'],
'2x' => ['width' => 1400, 'height' => 1400, 'quality' => 60,'format' => 'webp']
],
'xl' => [
'1x' => ['width' => 600, 'height' => 600, 'quality' => 60,'format' => 'webp'],
'2x' => ['width' => 1200, 'height' => 1200, 'quality' => 60,'format' => 'webp']
],
'md' => [
'1x' => ['width' => 300, 'height' => 300, 'quality' => 60,'format' => 'webp'],
'2x' => ['width' => 600, 'height' => 600, 'quality' => 60,'format' => 'webp']
],
'sm' => [
'1x' => ['width' => 150, 'height' => 150, 'quality' => 60,'format' => 'webp'],
'2x' => ['width' => 300, 'height' => 300, 'quality' => 60,'format' => 'webp']
],
'xs' => [
'1x' => ['width' => 80, 'height' => 80, 'quality' => 60,'format' => 'webp'],
'2x' => ['width' => 160, 'height' => 160, 'quality' => 60,'format' => 'webp']
],
]
],