// check for a valid image
if(!$this->source->exists() || $this->source->type() != 'image') {
throw new Error('The given image is invalid', static::ERROR_INVALID_IMAGE);
}
// check for a valid driver
if(!array_key_exists($this->options['driver'], static::$drivers)) {
throw new Error('Invalid thumbnail driver', static::ERROR_INVALID_DRIVER);
@Lumega Could you please elaborate a bit more? I’m missing some context and the Kirby version your are referring to.