You are here

public function Webp::buildConfigurationForm in WebP 8

File

src/Plugin/ImageAPIOptimizeProcessor/Webp.php, line 40

Class

Webp
Saves a WebP copy of an image style derivative.

Namespace

Drupal\webp\Plugin\ImageAPIOptimizeProcessor

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form['quality'] = [
    '#type' => 'number',
    '#title' => $this
      ->t('Image quality'),
    '#description' => $this
      ->t('Specify the image quality.'),
    '#default_value' => $this->configuration['quality'],
    '#required' => TRUE,
    '#min' => 1,
    '#max' => 100,
  ];
  return $form;
}