You are here

public function Images::imageStyleField in Bamboo Twig 8

Generate Image Style, with responsive format.

Parameters

Drupal\file\Plugin\Field\FieldType\FileFieldItemList $field: Field File Entity to retrieve cover and generate it.

array $styles: Styles to be generated.

Return value

array Generated link of styles

File

bamboo_twig_images/src/TwigExtension/Images.php, line 66

Class

Images
Provides a 'Images' Twig Extensions.

Namespace

Drupal\bamboo_twig_images\TwigExtension

Code

public function imageStyleField(FileFieldItemList $field, array $styles) {
  return $this->imageStyleGenerator
    ->fromField($field, $styles);
}