1
Fork 0

Add async decoding to more images

This commit is contained in:
Jake Howard 2021-12-27 10:59:29 +00:00
parent 9c369fa8d9
commit 1ef53bb45b
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@
<div id="light-gallery" class="row"> <div id="light-gallery" class="row">
{{ range $element := $photoset.photo }} {{ range $element := $photoset.photo }}
<a href="{{ $element.url_k }}" title="{{ $element.title }}" class="col-md-2 col-xs-12"> <a href="{{ $element.url_k }}" title="{{ $element.title }}" class="col-md-2 col-xs-12">
<img src="{{ $element.url_q }}" alt="{{ $element.title }}" referrerpolicy="no-referrer"/> <img src="{{ $element.url_q }}" alt="{{ $element.title }}" referrerpolicy="no-referrer" decoding="async" loading="lazy"/>
</a> </a>
{{ end }} {{ end }}
</div> </div>

View file

@ -10,7 +10,7 @@
{{ .Scratch.Set "image" $unsplash_data.urls.regular }} {{ .Scratch.Set "image" $unsplash_data.urls.regular }}
{{ end }} {{ end }}
<img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' alt="" /> <img class="mb-3 header-image" src='{{ .Scratch.Get "image" }}' alt="" decoding="async" loading="lazy" referrerpolicy="no-referrer" />
{{ end }} {{ end }}
{{ partial "breadcrumbs/index.html" . }} {{ partial "breadcrumbs/index.html" . }}

View file

@ -3,7 +3,7 @@
{{ $data := dict "code" .Inner "mermaid" $mermaidData }} {{ $data := dict "code" .Inner "mermaid" $mermaidData }}
<figure class="mermaid"> <figure class="mermaid">
<img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer" /> <img src="https://mermaid.ink/img/{{ $data | jsonify | base64Encode }}" referrerpolicy="no-referrer" decoding="async" loading="lazy" />
<figcaption class="text-center"> <figcaption class="text-center">
<small>{{ .Get "caption" }}</small> <small>{{ .Get "caption" }}</small>
</figcaption> </figcaption>