Using Drupal 8
I have a view:
- Unformatted List
- Two fields, Title and an Image with Image URL formatter via the module Image Url Formatter
I need to print out that URL such that:
The problem lies in the fact that I have TWIG DEBUGGING enabled , so the output of the field also includes all the debug mumbo-jumbo that I don't need. I don't want to have to be turning on/off debugging to make sure this works, I want a way to print the content without that mumbo jumbo.
I thought this post would help. It explains that
field.content contains the rendered field, and what I am looking for is the field data from the database.
When trying this out with
views-view-fields.html.twig , the code
row._entity.field_art_image.value works great but it returns the information about the image itself (alt, title, width, height..) but not its URL.
Is there a way for me to access either the image url that points to the Image Style applied to the filed? (For example
file_url(row._entity.field_art_image.entity.uri.value) works, but it returns the URL to the uploaded image, not the one that results from the Image Style applied.