You are here

public function Images::getImage in Bamboo Twig 8

Load an image from file uri.

Parameters

string $file_uri: File URI on the current server.

Return value

\Drupal\Core\Image\ImageInterface An Image object.

File

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

Class

Images
Provides a 'Images' Twig Extensions.

Namespace

Drupal\bamboo_twig_images\TwigExtension

Code

public function getImage($file_uri) {
  return $this->imageFactory
    ->get($file_uri);
}