You are here

public function Images::imageStyleFile in Bamboo Twig 8

Generate Image Style, with responsive format.

Parameters

int $fid: File id to generate.

array $styles: Styles to be generated.

Return value

array Generated link of styles

File

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

Class

Images
Provides a 'Images' Twig Extensions.

Namespace

Drupal\bamboo_twig_images\TwigExtension

Code

public function imageStyleFile($fid, array $styles) {
  return $this->imageStyleGenerator
    ->fromFile($fid, $styles);
}