public function Webp::applyToImage in WebP 8
File
- src/
Plugin/ ImageAPIOptimizeProcessor/ Webp.php, line 22
Class
- Webp
- Saves a WebP copy of an image style derivative.
Namespace
Drupal\webp\Plugin\ImageAPIOptimizeProcessorCode
public function applyToImage($image_uri) {
/* @var \Drupal\webp\Webp $webp */
$webp = \Drupal::service('webp.webp');
$webp
->createWebpCopy($image_uri, $this->configuration['quality']);
}