Reference

Guide

thumbs

Set default configuration for thumbs

Presets

Since 3.0.3

You can define option presets for thumbs:

/site/config/config.php
return [
    'thumbs' => [
        'presets' => [
            'default' => ['width' => 1024, 'quality' => 80],
            'blurred' => ['blur' => true]
        ]
    ]
];

To be used with the $file->thumb() method. Learn more ›

Auto-orient

Automatically rotate images based on their exif orientation data.

return [
  'thumbs' => [
    'autoOrient' => true
  ]
];

Quality

The default JPEG compression quality for all thumbnails

return [
  'thumbs' => [
    'quality' => '80'
  ]
];

Thumbs driver

Kirby comes with drivers for GD Lib (gd) and ImageMagick (im), which can be used out of the box. The default thumbs driver is gd.

You can also define your own custom thumbs drivers.

return [
  'thumbs' => [
    'driver' => 'im'
  ]
];

Additional options for the ImageMagick driver

bin

If the ImageMagick convert binary is not correctly linked, you can set the absolute path to the binary here.

return [
  'thumbs' => [
    'bin' => 'convert'
  ]
];

interlace

JPEGs can be set to interlace mode with this option

return [
  'thumbs' => [
    'interlace' => false
  ]
];