Kirby::plugin('moeli/own-thumb', [
'components' => [
'thumb' => function (Kirby\Cms\App $kirby, string $src, string $dst, array $options) {
if (isset($options['own']) === true) {
return myThumbGenerator($src, $dst, $options);
}
$core = require $kirby->root('kirby') . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'components.php';
return $core['thumb']($kirby, $src, $dst, $options);
}
],
]);
Thx @distantnative. Good idea. I just changed the root folder because ‘config’ seems to point to ‘site/config’