How can I access the raw value of a view in a template? I am looking for a way to get the url of an image dynamically to put it as a background.
So I created a view that get the image field of the node or taxonomy term, which is supposed to output the url only (I have tried only with the node so far). I have been cleaning as much as possible everything inside the view and also the template of the view looks basically like {{rows}} and that's it.
But there is still a wrapper div that I can't trim:

&lt;div class="views-element-container form-group"&gt;
      &lt;div&gt;/sites/default/files/2018-08/bg_image.jpg&lt;/div&gt;

&lt;/div&gt;


How can I trim the twig variable created in the theme to get rid of the html tags ?

When I try strip_tags() function in the theme preprocess or |striptags or |trim directly in the template, it's not working and I have a lot of errors starting with Warning: strip_tags() expects parameter 1 to be string, array given in __TwigTemplate for example
I found a solution. I was looking at the problem the wrong way. It is possible to get the raw url value of an image field in a page template by using native twig-drupal functions instead of using a view => https://drupal.stackexchange.com/a/224311/16146