Skip to main content
improved formatting and punctuation
Source Link
avpaderno
  • 98.1k
  • 15
  • 165
  • 284

enter image description here

In the view you created, select theURL to image as image formatter as "URL to image" Then.

screenshot

Then, in the views twigview template file, you will getbe able to access the IMAGEimage URL with code similar to the following one.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 
<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photofield_cover_photo is my fieldsthe field machine name, in my case.

enter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photo is my fields machine name.

In the view you created, select URL to image as image formatter.

screenshot

Then, in the view template file, you will be able to access the image URL with code similar to the following one.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

field_cover_photo is the field machine name, in my case.

deleted 3 characters in body
Source Link
Aurora
  • 11
  • 1
  • 4

![enter image description hereenter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photo is my fields machine name.

![enter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photo is my fields machine name.

enter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photo is my fields machine name.

added 7 characters in body
Source Link
Aurora
  • 11
  • 1
  • 4

enter image description here![enter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

 
<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photo is my fields machine name.

enter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

 

Here field_cover_photo is my fields machine name.

![enter image description here

In the view you created, select the image formatter as "URL to image" Then in the views twig template , you will get the IMAGE URL.

<img class="img-fluid" src="{{ fields.field_cover_photo.content }}" alt="test"> 

Here field_cover_photo is my fields machine name.

Source Link
Aurora
  • 11
  • 1
  • 4
Loading