portails/layouts/shortcodes/img-simple.html

3 lines
380 B
HTML
Raw Normal View History

2020-11-04 08:26:58 +01:00
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}}
{{ $lqip := $image.Resize $.Site.Params.lqipWidth -}}
2021-04-02 19:45:05 +02:00
<img class="img-simple img-fluid lazyload blur-up{{ with .Get "class" }} {{.}}{{ end }}" src="{{ $lqip.RelPermalink }}" data-src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>