You are here

public function ImageEffectBase::getDerivativeExtension in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/image/src/ImageEffectBase.php \Drupal\image\ImageEffectBase::getDerivativeExtension()

Returns the extension the derivative would have have after applying this image effect.

Parameters

string $extension: The file extension the derivative has before applying.

Return value

string The file extension after applying.

Overrides ImageEffectInterface::getDerivativeExtension

1 method overrides ImageEffectBase::getDerivativeExtension()
ConvertImageEffect::getDerivativeExtension in core/modules/image/src/Plugin/ImageEffect/ConvertImageEffect.php
Returns the extension the derivative would have have after applying this image effect.

File

core/modules/image/src/ImageEffectBase.php, line 82
Contains \Drupal\image\ImageEffectBase.

Class

ImageEffectBase
Provides a base class for image effects.

Namespace

Drupal\image

Code

public function getDerivativeExtension($extension) {

  // Most image effects will not change the extension. This base
  // implementation represents this behavior. Override this method if your
  // image effect does change the extension.
  return $extension;
}