From 23d9c87499874e5e103d1f243617c34f6b5ad611 Mon Sep 17 00:00:00 2001 From: Eddie Webb Date: Wed, 8 Sep 2021 19:01:14 -0400 Subject: workaround hugo bug in imageresource support for webp --- layouts/shortcodes/imgresize.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/imgresize.html b/layouts/shortcodes/imgresize.html index d96598f..a33e331 100644 --- a/layouts/shortcodes/imgresize.html +++ b/layouts/shortcodes/imgresize.html @@ -1,6 +1,9 @@ {{ $original := .Page.Resources.GetMatch (.Get 0) }} +{{ $path := path.Join "content" $original.RelPermalink }} +{{ $imgAttributes := imageConfig $path }} {{ $options := .Get 1 }} {{ .Scratch.Set "image" ($original.Fit $options) }} {{ $image := .Scratch.Get "image" }} {{ $title := .Get 2 }} -{{ $title }} \ No newline at end of file +{{ $title }} + -- cgit v1.2.3