← hugo-clarity

[Bug] Path to thumbnail images incorrect on second and higher page #427 - absolute path

6cb76c9dc8789bd2840fcf7d661bd58a2085a5c7 · ovidiucs · Jul 12, 2023 02:26

+2 −2 · 1 file changed

  • layouts/partials/figure.html +2 −2
diff --git a/layouts/partials/figure.html b/layouts/partials/figure.html
index e5b7afc..28203af 100644
--- a/layouts/partials/figure.html
+++ b/layouts/partials/figure.html
@@ -54,10 +54,10 @@
         class="{{ $classes }} image_processed"
         width="{{ .Width }}"
         height="{{ .Height }}"
-        src="{{ .RelPermalink }}"
+        src="{{ .RelPermalink | absURL }}"
       {{ else }}
         class="{{ $classes }} image_unprocessed"
-        src="{{ $fileWeb }}"
+        src="{{ $fileWeb | absURL }}"
       {{ end }}
       {{ with $cap }}
         title="{{ safeHTML $cap }}"