mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
Add decoding async to images
This commit is contained in:
parent
c15a43b81a
commit
d22bde5d70
8 changed files with 9 additions and 9 deletions
|
@ -30,7 +30,7 @@
|
|||
|
||||
{% if image %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
{% if image %}
|
||||
<span class="image object fit">
|
||||
{{image.loading('lazy').html(title,title)|raw}}
|
||||
{{image.loading('lazy').attribute('decoding','async').html(title,title)|raw}}
|
||||
</span>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</header>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{{ page.content|raw }}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{% endif %}
|
||||
</header>
|
||||
<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>
|
||||
</article>
|
||||
</li>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</header>
|
||||
{% if image %}
|
||||
<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>
|
||||
{% endif %}
|
||||
<div itemprop="articleBody">
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</header>
|
||||
{% if 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>
|
||||
{% endif %}
|
||||
</article>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
{% if thumb %}
|
||||
<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>
|
||||
{% endif %}
|
||||
<div class="search-item">
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</header>
|
||||
{% if image %}
|
||||
<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>
|
||||
{% endif %}
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
|||
{% set item_image = page.media[item.image] %}
|
||||
{% set item_title = item.title %}
|
||||
{% 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">
|
||||
<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">
|
||||
|
|
Loading…
Add table
Reference in a new issue