clean up code and add lazy-loading
This commit is contained in:
parent
6d688ae205
commit
1c5631d82c
1 changed files with 2 additions and 10 deletions
|
@ -1,11 +1,3 @@
|
|||
{{ if .Title }}
|
||||
<figure>
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||
<figcaption>{{ .Title }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
<figure>
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ $img := imageConfig (add "/static/" (.Destination | safeURL)) }}
|
||||
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" loading="lazy"/>
|
||||
|
|
Loading…
Reference in a new issue