Skip to content
Snippets Groups Projects
Verified Commit bed7694f authored by Jake's avatar Jake
Browse files

lazy load media content

closes #54
parent 0b75b7e0
No related branches found
No related tags found
No related merge requests found
Pipeline #319945 passed
......@@ -64,7 +64,7 @@
{%- set ns.url = [siteurl, ns.url]|join("/") -%}
{%- endif -%}
{%- endif -%}
<img {{ render_attr(attr, lang, extra={"src": ns.url, "title": {"value":title, "escape": true}}) }} alt="
<img {{ render_attr(attr, lang, extra={"src": ns.url, "title": {"value":title, "escape": true}, "loading": "lazy"}) }} alt="
{%- if alt is string -%}
{{ alt|e }}
{%- else -%}
......
......@@ -24,7 +24,7 @@
{%- endmacro -%}
{%- macro section_iframe(s, lang) -%}
<iframe src="{{ s.url }}"></iframe>
<iframe src="{{ s.url }}" loading="lazy"></iframe>
{%- endmacro -%}
{%- macro section_tag(s, lang) -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment