You are here

public static function ReSmushit::create in Image Optimize reSmush.it 8

Same name and namespace in other branches
  1. 2.x src/Plugin/ImageAPIOptimizeProcessor/ReSmushit.php \Drupal\imageapi_optimize_resmushit\Plugin\ImageAPIOptimizeProcessor\ReSmushit::create()

File

src/Plugin/ImageAPIOptimizeProcessor/ReSmushit.php, line 44

Class

ReSmushit
Uses the resmush.it webservice to optimize an image.

Namespace

Drupal\imageapi_optimize_resmushit\Plugin\ImageAPIOptimizeProcessor

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  return new static($configuration, $plugin_id, $plugin_definition, $container
    ->get('logger.factory')
    ->get('imageapi_optimize'), $container
    ->get('image.factory'), $container
    ->get('http_client'));
}