diff options
-rw-r--r-- | src/layouts/_default/_markup/render-image.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/layouts/_default/_markup/render-image.html b/src/layouts/_default/_markup/render-image.html index 9969470e..70214425 100644 --- a/src/layouts/_default/_markup/render-image.html +++ b/src/layouts/_default/_markup/render-image.html @@ -1,4 +1,5 @@ -{{- $img := imageConfig (add "/src/static" (.Destination | safeURL)) -}} +{{- $src := .Destination | safeURL -}} +{{- $config := imageConfig (add "/src/static" $src) -}} {{- $classes := "d-block img-fluid mb-2 rounded border" -}} -<img src="{{ .Destination | safeURL }}" class="{{ $classes }}" alt="{{ .Text }}" loading="lazy" width="{{ $img.Width }}" height="{{ $img.Height }}"> +<img src="{{ $src }}" class="{{ $classes }}" alt="{{ .Text }}" loading="lazy" width="{{ $config.Width }}" height="{{ $config.Height }}"> |