From 752fd5805fa50d490ea99df4780b3ab73a14db0f Mon Sep 17 00:00:00 2001 From: Jimmy Date: Sun, 26 Apr 2026 20:20:51 +0200 Subject: [PATCH] fix(image): correct permalink handling for images placed in `static` folder (#1330) * fix(image): correct permalink handling for images placed in `static` folder related: https://github.com/CaiJimmy/hugo-theme-stack/discussions/1307 * Remove urls.AbsURL --- layouts/_partials/helper/image.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/_partials/helper/image.html b/layouts/_partials/helper/image.html index 2ee4f39..51e71ff 100644 --- a/layouts/_partials/helper/image.html +++ b/layouts/_partials/helper/image.html @@ -14,12 +14,14 @@ {{ if .Image }} {{ $url := urls.Parse .Image }} {{ $permalink := .Image }} - {{ $resource := dict + + {{ $result = dict "Resource" nil "Permalink" $permalink "Height" nil "Width" nil }} + {{ $resource := dict }} {{ $local := true }} {{ if not (in (slice "https" "http") $url.Scheme) }}