public function hasSupportForWebP()
{
if ($this->imageDriver === 'gd' && function_exists('imagewebp')) {
return true;
}
if ($this->imageDriver === 'imagick' && count(\Imagick::queryformats('WEBP')) > 0) {
return true;
}
if ($this->getSetting('useCwebp') && $this->getSetting('cwebpPath') !== '' && file_exists($this->getSetting('cwebpPath'))) {
return true;
}
return false;
}