diff --git a/layouts/shortcodes/img-simple.html b/layouts/shortcodes/img-simple.html index 2ed9b98..117bc81 100644 --- a/layouts/shortcodes/img-simple.html +++ b/layouts/shortcodes/img-simple.html @@ -1,3 +1,7 @@ {{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}} {{ $lqip := $image.Resize $.Site.Params.lqipWidth -}} - \ No newline at end of file +{{ if eq .Site.Params.options.lazySizes true -}} + +{{ else -}} + +{{ end -}} \ No newline at end of file diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index a6bdaac..51a6a9d 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -17,7 +17,11 @@ {{ $imgSrcSet = (delimit $imgSrcSet ",") -}} - + {{ if eq .Site.Params.options.lazySizes true -}} + + {{ else -}} + + {{ end -}} {{ with .Get "caption" }}
{{ . | safeHTML }}
{{ end }}