Rewriting image output in views: how to provide replacement pattern inside twig tag? In views I want to rewrite output of image field by using twig function drupal_image (see module Twig Tweak). When I provide the image path directly, this code works:

{{ drupal_image('public://myimage.jpg' , image_responsive_style, responsive=true) }}


But I can not manage to provide image path by a variable, like this pseudocode:

{{ drupal_image('{{ uri }}' , image_responsive_style, responsive=true) }}


The problem seems to be how to provide the variable {{ uri }} properly inside the surrounding twig tag.
Remove quotes.  
Remove wiggly brackets around.
Surround image_responsive_style by quote.
responsive=true Should passed as object:




    {{ drupal_image(uri , 'image_responsive_style', {responsive: true}) }}