Images can be lazy as well! (fixes #39)

This commit is contained in:
daudix
2024-07-29 17:47:26 +03:00
parent 7c176c09d2
commit 16762b4bc4
3 changed files with 20 additions and 3 deletions

View File

@ -10,7 +10,9 @@
{% if no_hover %}no-hover{% endif %}
"
{%- if alt -%}alt="{{ alt }}"{%- endif -%}
src="{{ url_min }}" />
src="{{ url_min }}"
{%- if config.markdown.lazy_async_image -%}decoding="async" loading="lazy"{%- endif -%}
/>
</a>
{%- else -%}
<img class="
@ -23,5 +25,7 @@
{% if no_hover %}no-hover{% endif %}
"
{%- if alt -%}alt="{{ alt }}"{%- endif -%}
src="{{ url }}" />
src="{{ url }}"
{%- if config.markdown.lazy_async_image -%}decoding="async" loading="lazy"{%- endif -%}
/>
{%- endif -%}