You are here

public function ImageStylesWarmer::initialWarmUp in Image Style Warmer 8

Initial warm up of images style from a file.

Parameters

\Drupal\file\FileInterface $file: The file for which image styles should be created.

Overrides ImageStylesWarmerInterface::initialWarmUp

Deprecated

Will be removed in upcoming RC release. Please use doWarmUp() instead.

File

src/ImageStylesWarmer.php, line 115

Class

ImageStylesWarmer
Defines an images styles warmer.

Namespace

Drupal\image_style_warmer

Code

public function initialWarmUp(FileInterface $file) {
  $initialImageStyles = $this->config
    ->get('initial_image_styles');
  if (!empty($initialImageStyles)) {
    $this
      ->doWarmUp($file, array_keys($initialImageStyles));
  }
}