Add decoding async to images

This commit is contained in:
Pedro Moreno 2023-02-23 20:42:21 +01:00
parent c15a43b81a
commit d22bde5d70
8 changed files with 9 additions and 9 deletions

View file

@ -30,7 +30,7 @@
{% if image %} {% if image %}
<span class="image featured"> <span class="image featured">
{{ image.cropZoom(1038, 437).loading('lazy').html(title, title)|raw }} {{ image.cropZoom(1038, 437).loading('lazy').attribute('decoding','async').html(title, title)|raw }}
</span> </span>
{% endif %} {% endif %}

View file

@ -19,7 +19,7 @@
</div> </div>
{% if image %} {% if image %}
<span class="image object fit"> <span class="image object fit">
{{image.loading('lazy').html(title,title)|raw}} {{image.loading('lazy').attribute('decoding','async').html(title,title)|raw}}
</span> </span>
{% endif %} {% endif %}
</section> </section>

View file

@ -12,7 +12,7 @@
</header> </header>
{% if image %} {% if image %}
{{ image.cropZoom(1038,437).loading('lazy').html(title, title, 'image featured')|raw }} {{ image.cropZoom(1038,437).loading('lazy').attribute('decoding','async').html(title, title, 'image featured')|raw }}
{% endif %} {% endif %}
{{ page.content|raw }} {{ page.content|raw }}

View file

@ -16,7 +16,7 @@
{% endif %} {% endif %}
</header> </header>
<a href="{{p.url}}" class="image"> <a href="{{p.url}}" class="image">
{{ image.cropZoom(64,64).quality(60).loading('lazy').html(title,title)|raw }} {{ image.cropZoom(64,64).quality(60).loading('lazy').attribute('decoding','async').html(title,title)|raw }}
</a> </a>
</article> </article>
</li> </li>

View file

@ -47,7 +47,7 @@
</header> </header>
{% if image %} {% if image %}
<a class="image featured" href="{{ page.url }}" title="{{ title|raw }}"> <a class="image featured" href="{{ page.url }}" title="{{ title|raw }}">
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }} {{ image.cropZoom(1038,437).loading('lazy').attribute('decoding','async').html(title, title)|raw }}
</a> </a>
{% endif %} {% endif %}
<div itemprop="articleBody"> <div itemprop="articleBody">

View file

@ -38,7 +38,7 @@
</header> </header>
{% if image %} {% if image %}
<a href="{{ p.url }}" class="image"> <a href="{{ p.url }}" class="image">
{{ image.cropZoom(1038,437).loading('lazy').html(title,title)|raw}} {{ image.cropZoom(1038,437).loading('lazy').attribute('decoding','async').html(title,title)|raw}}
</a> </a>
{% endif %} {% endif %}
</article> </article>

View file

@ -5,7 +5,7 @@
{% if thumb %} {% if thumb %}
<div class="search-image"> <div class="search-image">
<a href="{{ page.url }}">{{ thumb.loading('lazy').html(title,title)|raw }}</a> <a href="{{ page.url }}">{{ thumb.loading('lazy').attribute('decoding','async').html(title,title)|raw }}</a>
</div> </div>
{% endif %} {% endif %}
<div class="search-item"> <div class="search-item">

View file

@ -40,7 +40,7 @@
</header> </header>
{% if image %} {% if image %}
<span class="image featured"> <span class="image featured">
{{ image.cropZoom(1038,437).loading('lazy').html(title, title)|raw }} {{ image.cropZoom(1038,437).loading('lazy').attribute('decoding','async').html(title, title)|raw }}
</span> </span>
{% endif %} {% endif %}
@ -54,7 +54,7 @@
{% set item_image = page.media[item.image] %} {% set item_image = page.media[item.image] %}
{% set item_title = item.title %} {% set item_title = item.title %}
{% set item_desc = item.description %} {% set item_desc = item.description %}
{% set thumbnail = item_image.cropZoom(thumb_w, thumb_h).attribute('itemprop','http://schema.org/image').html(item_title,item_title) %} {% set thumbnail = item_image.cropZoom(thumb_w, thumb_h).loading('lazy').attribute('decoding','async').attribute('itemprop','http://schema.org/image').html(item_title,item_title) %}
<div class="{{columns}} portfolio_item"> <div class="{{columns}} portfolio_item">
<a href="{{item_image.url}}" class="glightbox"data-height="{{page.header.height}}" data-width="{{page.header.width}}" data-title="{{item_title}}" data-description="{{item_desc|raw}}" data-desc-position="{{item.descPosition}}" data-zoomable="{{page.header.zoomable}}" data-draggable="{{page.header.draggable}}" data-type="image"> <a href="{{item_image.url}}" class="glightbox"data-height="{{page.header.height}}" data-width="{{page.header.width}}" data-title="{{item_title}}" data-description="{{item_desc|raw}}" data-desc-position="{{item.descPosition}}" data-zoomable="{{page.header.zoomable}}" data-draggable="{{page.header.draggable}}" data-type="image">
<span class="image fit"> <span class="image fit">