You are here

function webp_install in WebP 8

Implements hook_install().

File

./webp.install, line 38
Contains install and update functions for WebP.

Code

function webp_install() {

  // If the Image API Optimize module exists, the user needs to configure
  // a processor first, so there's no use in deleting all image style
  // derivatives.
  if (!\Drupal::moduleHandler()
    ->moduleExists('imageapi_optimize')) {

    /* @var \Drupal\webp\Webp $webp */
    $webp = \Drupal::service('webp.webp');
    $webp
      ->deleteImageStyleDerivatives();
  }
}