Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/eddiewebb/hugo-resume.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEddie Webb <ollitech@gmail.com>2021-09-09 02:01:14 +0300
committerEddie Webb <ollitech@gmail.com>2021-09-09 02:01:14 +0300
commit23d9c87499874e5e103d1f243617c34f6b5ad611 (patch)
tree8713c53d1fa17194849eb2c3c4ccf80bc74054f2
parent76ac99dd57353e2222a7c028ac8ada3627de5478 (diff)
workaround hugo bug in imageresource support for webp
-rw-r--r--layouts/shortcodes/imgresize.html5
1 files changed, 4 insertions, 1 deletions
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 }}
-<img class="mb-5 mt-0" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ $title }}"> \ No newline at end of file
+<img class="mb-5 mt-0" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ $title }}">
+