From 8989f5186ad2a00656d06822854a101be46e5f5d Mon Sep 17 00:00:00 2001 From: stereobooster Date: Wed, 13 Sep 2023 08:48:48 +0200 Subject: [PATCH] added lqip to picture --- layouts/partials/picture.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts/partials/picture.html b/layouts/partials/picture.html index 207f5d07..a8a26819 100644 --- a/layouts/partials/picture.html +++ b/layouts/partials/picture.html @@ -22,7 +22,15 @@ {{ $resource = resources.Get ($url.String) }} {{ end }} {{ with $resource }} - + {{ if ne .MediaType.SubType "svg" }} + {{ $lqip := (.Resize "20x webp").Content | base64Encode }} + + {{ else }} + + {{ end }} {{ if (and (ne .MediaType.SubType "svg") $webp) }}