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:
<div class="views-element-container form-group">
<div>/sites/default/files/2018-08/bg_image.jpg</div>
</div>
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