How to wrap views-view-fields.html.twig with html container element? I have a block view with an image field.

I know how to theme this field :

views-view-fields—my-images.html.twig


How can I wrap this loop with an element like : &lt;div class="slider-article"&gt;

I’ve tried different solutions without success. 

Theme the block twig template :

If I use block--views-block--slider-images.html.twig

Of course it doesn’t work because there is no possibility to theme the field inside this twig template.

I’ve tried to add my wrapper in the header and footer option in the view but even if it works, it is not perfect since I need to have a better control on the html (I’m doing a slick slider, I know there is a module but I don’t want to use it).

I’m trying to do something I can do in node :

In  node—lorem.html.twig :

{{ content.field_my_images }}


In field--field-my_images.html.twig 

&lt;div class="slider-article"&gt;

    {% for item in items %}

        &lt;div&gt;

            {{ item.content }}

        &lt;/div&gt;

    {% endfor %}

&lt;/div&gt;


I’ve also checked all the "rewrite results" options in view but didn’t manage to add a wrapper.

I prefer a solution where I can create my custom html strcucture like the above example with a loop.

EDIT

Here is the HTML structure I need :

&lt;!-- How can I add this wrapper ? --&gt;
&lt;div class="slider-article"&gt;
  &lt;!-- views-view-fields--[view-name]--[machine-name].html.twig starts here ! --&gt;
  &lt;div&gt;your content&lt;/div&gt;
  &lt;div&gt;your content&lt;/div&gt;
  &lt;div&gt;your content&lt;/div&gt;
  &lt;!-- END OF views-view-fields--[view-name]--[machine-name].html.twig --&gt;
&lt;/div&gt;
Option 1

You can by copying (the entire code) from core views-view.html and paste it in your theme's template folder and rename it views-view--[view-name].html.twig and then add your class to this template file.

replace {{ rows }} with 

&lt;div class="slider-article"&gt;
{{ rows }}
&lt;/div&gt;


Option 2

Copy from core views-view-fields and paste it in your theme's template folder, rename it views-view-fields--[view-name].html.twig

Then add your div with class before {% for field in fields -%} and add close tag after {%- endfor %}

Option 3 (maybe)

You can add it via the Views UI by clicking on "None". But this will add the wrapper to the entire view, which you may not want.