{% load wagtailimages_tags wagtailcore_tags my %}
= 2 and not amp %}data-src="{{ media.value.url }}"{% else %}style="background-image: url({{ media.value.url }})"{% endif %} {% elif media.block_type == 'image' %} {% image media.value fill-1920x1080 as img %} {% if block_num >= 2 and not amp %}data-src="{{ img.url }}"{% else %}style="background-image: url({{ img.url }})"{% endif %} {% endif %} {% endfor %} {% endif %} {% if not request.user_agent.is_pc %} {% for media in value.bg_mobile %} {% if media.block_type == 'svg' %} {% if block_num >= 2 and not amp %}data-src="{{ media.value.url }}"{% else %}style="background-image: url({{ media.value.url }})"{% endif %} {% elif media.block_type == 'image' %} {% image media.value fill-1920x1080 as img %} {% if block_num >= 2 and not amp %}data-src="{{ img.url }}"{% else %}style="background-image: url({{ img.url }})"{% endif %} {% endif %} {% endfor %} {% endif %} >
{% block block_content %} {% endblock %}