{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
<section class="pictures-group">
    {% for line in section.images %}
    {% for image in line %}
    {% if image.type == "video" %}
    {% set video = Video.get(link + "/" + pathstatic, image) %}
    {% set format = settings.ffmpeg.extension %}
    {% set vid = video.reencode((1280, 720)) %}
    {% else %}
    {% set image = Image.get(link + "/" + pathstatic, image) %}
    {% endif %}
    {% set caption = image.text %}
    <div class="image">
        {% if video %}
        <video class="responsive-video" id="video" poster="{{ pathstatic }}/{{ video.thumbnail((None, 800)) }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
          <source src="{{ pathstatic }}/{{ vid }}" type="video/{{ format }}">
        </video>
        {% set video = "" %}
        {% else %}
        <img src="{{ pathstatic }}/{{ image.thumbnail((None, 800)) }}" alt="{% if caption %}{{ caption }}{% endif %}">
        {% endif %}
    </div>
    {% endfor %}
    {% endfor %}
</section>
