Assign cover for PDF in the panel

Why are you giving up on your custom file method if that works for your naming scheme?

Kirby::plugin('my/plugin', [
    'fileMethods' => [
        'customThumbnail' => function () {
            return $this->parent()->file($this->name() . '.jpg');
        }
    ]
]);
1 Like