|
5 | 5 | <picture> |
6 | 6 | {% if site.imagemagick.enabled %} |
7 | 7 | {% for i in site.imagemagick.widths -%} |
8 | | - <source |
| 8 | + <source |
9 | 9 | class="responsive-img-srcset" |
10 | | - media="(max-width: {{ i }}px)" |
| 10 | + media="(max-width: {{ i }}px)" |
11 | 11 | srcset="{{ img_path | relative_url }}-{{ i }}.webp" |
12 | 12 | /> |
13 | 13 | {% endfor -%} |
14 | 14 | {% endif %} |
15 | 15 |
|
16 | 16 | <!-- Fallback to the original file --> |
17 | | - <img |
18 | | - src="{{ include.path | relative_url }}" |
19 | | - {% if include.class %}class="{{ include.class }}"{% endif %} |
20 | | - {% if include.width %}width="{{ include.width }}"{% else %}width="auto"{% endif %} |
21 | | - {% if include.height %}height="{{ include.height }}"{% else %}height="auto"{% endif %} |
22 | | - {% if include.min-width %}min-width="{{ include.min-width }}"{% endif %} |
23 | | - {% if include.min-height %}min-height="{{ include.min-height }}"{% endif %} |
24 | | - {% if include.max-width %}max-width="{{ include.max-width }}"{% endif %} |
25 | | - {% if include.max-height %}max-height="{{ include.max-height }}"{% endif %} |
26 | | - {% if include.alt %}alt="{{ include.alt }}"{% endif %} |
27 | | - {% if include.title %}title="{{ include.title }}"{% endif %} |
| 17 | + <img |
| 18 | + src="{% if include.cache_bust %}{{ include.path | relative_url | bust_file_cache }}{% else %}{{ include.path | relative_url }}{% endif %}" |
| 19 | + {% if include.class %}class="{{ include.class }}"{% endif %} |
| 20 | + {% if include.width %}width="{{ include.width }}"{% else %}width="auto"{% endif %} |
| 21 | + {% if include.height %}height="{{ include.height }}"{% else %}height="auto"{% endif %} |
| 22 | + {% if include.min-width %}min-width="{{ include.min-width }}"{% endif %} |
| 23 | + {% if include.min-height %}min-height="{{ include.min-height }}"{% endif %} |
| 24 | + {% if include.max-width %}max-width="{{ include.max-width }}"{% endif %} |
| 25 | + {% if include.max-height %}max-height="{{ include.max-height }}"{% endif %} |
| 26 | + {% if include.alt %}alt="{{ include.alt }}"{% endif %} |
| 27 | + {% if include.title %}title="{{ include.title }}"{% endif %} |
28 | 28 | {% if include.zoomable %}data-zoomable{% endif %} |
29 | 29 | onerror="this.onerror=null; $('.responsive-img-srcset').remove();" |
30 | 30 | /> |
31 | | - |
32 | 31 | </picture> |
33 | 32 |
|
34 | 33 | {%- if include.caption -%}<figcaption class="caption">{{ include.caption }}</figcaption>{%- endif %} |
|
0 commit comments