A plugin for Kirby 2 CMS to shrink images on upload and replace to max size.
Copy or link the image-shrink
directory to site/plugins/
or use the Kirby CLI:
kirby plugin:install schnti/kirby-image-shrink
- ka.image.shrink.maxDimension: Integer of max dimension (Default:
1000
) - ka.image.shrink.customConfig: Additional config for $file->thumb()
c::set('ka.image.shrink.maxDimension', 2000);
c::set('ka.image.shrink.customConfig', array(
'imagekit.lazy' => false // e.g. for use with https://github.com/fabianmichael/kirby-imagekit
));
Nothing required. Plugin is using the panel.file.upload
and panel.file.replace
Hooks from Kirby