You are here

public function FocalPointCropImageEffect::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/FocalPointCropImageEffect.php, line 34

Class

FocalPointCropImageEffect
Crops image while keeping its focal point as close to centered as possible.

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/2929502
  return parent::defaultConfiguration() + [
    'crop_type' => 'focal_point',
  ];
}