Reverse order of source tags so they load in the correct order

This commit is contained in:
Jake Howard 2023-06-17 12:41:23 +01:00
parent 2535c30c2f
commit 2a349d32d3
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -13,7 +13,7 @@
{% block main_content %} {% block main_content %}
{% if page.hero_image_url %} {% if page.hero_image_url %}
<picture> <picture>
{% for width, image_url in page.hero_image_urls.items %}<source srcset="{{ image_url }}" media="(max-width: {{ width }}px)" />{% endfor %} {% for width, image_url in page.hero_image_urls.items reversed %}<source srcset="{{ image_url }}" media="(max-width: {{ width }}px)" />{% endfor %}
<img class="hero" src="{{ page.hero_image_url }}" decoding="async" alt="" /> <img class="hero" src="{{ page.hero_image_url }}" decoding="async" alt="" />
</picture> </picture>