function AvifImageEffect::isAvifSupported

Is AVIF supported by the image toolkit.

2 calls to AvifImageEffect::isAvifSupported()
AvifImageEffect::applyEffect in core/modules/image/src/Plugin/ImageEffect/AvifImageEffect.php
Applies an image effect to the image object.
AvifImageEffect::getDerivativeExtension in core/modules/image/src/Plugin/ImageEffect/AvifImageEffect.php
Returns the extension of the derivative after applying this image effect.

File

core/modules/image/src/Plugin/ImageEffect/AvifImageEffect.php, line 78

Class

AvifImageEffect
Converts an image resource to AVIF, with fallback.

Namespace

Drupal\image\Plugin\ImageEffect

Code

protected function isAvifSupported() : bool {
    return in_array('avif', $this->imageToolkitManager
        ->getDefaultToolkit()
        ->getSupportedExtensions());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.