Loading layouts/shortcodes/img-simple.html +5 −1 Original line number Diff line number Diff line {{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}} {{ $lqip := $image.Resize $.Site.Params.lqipWidth -}} {{ if eq .Site.Params.options.lazySizes true -}} <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 }}> {{ else -}} <img class="img-simple img-fluid{{ with .Get "class" }} {{.}}{{ end }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> {{ end -}} No newline at end of file layouts/shortcodes/img.html +5 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,11 @@ {{ $imgSrcSet = (delimit $imgSrcSet ",") -}} <figure{{ with .Get "class" }} class="{{.}}"{{ end }}> {{ if eq .Site.Params.options.lazySizes true -}} <img class="img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.RelPermalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> {{ else -}} <img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> {{ end -}} <noscript><img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript> {{ with .Get "caption" }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end }} </figure> Loading
layouts/shortcodes/img-simple.html +5 −1 Original line number Diff line number Diff line {{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}} {{ $lqip := $image.Resize $.Site.Params.lqipWidth -}} {{ if eq .Site.Params.options.lazySizes true -}} <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 }}> {{ else -}} <img class="img-simple img-fluid{{ with .Get "class" }} {{.}}{{ end }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> {{ end -}} No newline at end of file
layouts/shortcodes/img.html +5 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,11 @@ {{ $imgSrcSet = (delimit $imgSrcSet ",") -}} <figure{{ with .Get "class" }} class="{{.}}"{{ end }}> {{ if eq .Site.Params.options.lazySizes true -}} <img class="img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.RelPermalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> {{ else -}} <img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> {{ end -}} <noscript><img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript> {{ with .Get "caption" }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end }} </figure>