<div class="swiper-container">
    <div class="swiper mySwiper">
        <div class="swiper-wrapper">
            {% for sliderElement in element.slider.all() %}
            <div class="swiper-slide" style="background-image: url('{{ sliderElement.image.one().url }}');">
                {{sliderElement.text}}
            </div>
            {% endfor %}
        </div>
        <div class="swiper-pagination"></div>
        <div class="swiper-button-next"></div>
        <div class="swiper-button-prev"></div>
    </div>
</div>