You are here

public function FocalPointScaleAndCropImageEffect::defaultConfiguration in Focal Point 8

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ResizeImageEffect::defaultConfiguration

File

src/Plugin/ImageEffect/FocalPointScaleAndCropImageEffect.php, line 49

Class

FocalPointScaleAndCropImageEffect
Scales and crops image while keeping its focal point close to centered.

Namespace

Drupal\focal_point\Plugin\ImageEffect

Code

public function defaultConfiguration() {

  // Include a `crop_type` so that the crop module can act on images
  // generated using this effect.
  // @see crop_file_url_alter()
  // @see https://www.drupal.org/node/2842260
  return parent::defaultConfiguration() + [
    'crop_type' => 'focal_point',
  ];
}