Static images now use flask url_for to get url

This commit is contained in:
2023-09-11 10:28:24 -04:00
parent 9610d995de
commit b6f7f7a2b7
6 changed files with 41 additions and 38 deletions

View File

@@ -25,16 +25,16 @@
<picture>
{% for img in service['images'] %}
{% if not loop.last %}
<source srcset="{{ img }}"
<source srcset="{{ url_for('static', filename=img) }}"
media="(max-width: {{ config.IMG_BREAKPOINTS[loop.index] }})" />
{% else %}
<source srcset="{{ img }}"
<source srcset="{{ url_for('static', filename=img) }}"
media="(min-width: {{ config.IMG_BREAKPOINTS[loop.index] }})" />
{% endif %}
{% endfor %}
<img class="img-fluid card-img-top"
src="{{ service['images'][1] }}">
src="{{ url_for('static', filename=service['images'][1]) }}">
</picture>
<div class="card-body">
<h1 class="card-title text-center text-primary">{{ service['title'] }}</h1>