Answers for "drupal 8 image filtre"

1

drupal 8 get media image uri

$image_url = $media->field_media_image->entity->getFileUri();
file_create_url($image_url);
Posted by: Guest on October-01-2020
0

drupal 8 theme image render array

$image_variables = [
  '#theme' => 'image',
  '#uri' => $value['snippet']['thumbnails']['default']['url'],
  '#alt' => $title,
  '#title' => $title,
  '#width' => $width,
];

$image_variables = [
  '#theme' => 'image_style',
  '#uri' => $value['snippet']['thumbnails']['default']['url'],
  '#alt' => $title,
  '#title' => $title,
  '#width' => $width,
  '#style_name' => $image_style,
];
Posted by: Guest on October-01-2020

Browse Popular Code Answers by Language