function AvifImageEffect::getDerivativeExtension

Same name and namespace in other branches
  1. 11.x core/modules/image/src/Plugin/ImageEffect/AvifImageEffect.php \Drupal\image\Plugin\ImageEffect\AvifImageEffect::getDerivativeExtension()

Overrides ConvertImageEffect::getDerivativeExtension

File

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

Class

AvifImageEffect
Converts an image resource to AVIF, with fallback.

Namespace

Drupal\image\Plugin\ImageEffect

Code

public function getDerivativeExtension($extension) {
  return $this->isAvifSupported() ? 'avif' : $this->configuration['extension'];
}

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