Skip to content
Snippets Groups Projects
Verified Commit bed7694f authored by Jake's avatar Jake :speech_balloon:
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 @@ ...@@ -64,7 +64,7 @@
{%- set ns.url = [siteurl, ns.url]|join("/") -%} {%- set ns.url = [siteurl, ns.url]|join("/") -%}
{%- endif -%} {%- endif -%}
{%- 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 -%} {%- if alt is string -%}
{{ alt|e }} {{ alt|e }}
{%- else -%} {%- else -%}
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
{%- endmacro -%} {%- endmacro -%}
{%- macro section_iframe(s, lang) -%} {%- macro section_iframe(s, lang) -%}
<iframe src="{{ s.url }}"></iframe> <iframe src="{{ s.url }}" loading="lazy"></iframe>
{%- endmacro -%} {%- endmacro -%}
{%- macro section_tag(s, lang) -%} {%- macro section_tag(s, lang) -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment