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

github.com/twbs/blog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/layouts/_default/_markup/render-image.html5
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 }}">