diff --git a/layouts/partials/helper/image.html b/layouts/partials/helper/image.html index 5276f2e..8534592 100644 --- a/layouts/partials/helper/image.html +++ b/layouts/partials/helper/image.html @@ -12,20 +12,14 @@ {{ $result = merge $result (dict "permalink" $imageValue) }} {{ else }} {{ $pageResourceImage := .Context.Resources.GetMatch (printf "%s" ($imageValue | safeURL)) }} - {{ $siteResourceImage := resources.GetMatch (printf "%s" ($imageValue | safeURL)) }} {{ if $pageResourceImage }} {{ $result = merge $result (dict "permalink" $pageResourceImage.RelPermalink) }} {{ $result = merge $result (dict "resource" $pageResourceImage) }} - {{ else if $siteResourceImage }} - - {{ $result = merge $result (dict "permalink" $siteResourceImage.RelPermalink) }} - {{ $result = merge $result (dict "resource" $siteResourceImage) }} {{ else }} - - {{ errorf "Failed loading image: %q" $imageValue }} - {{ $result = merge $result (dict "exists" false) }} + + {{ $result = merge $result (dict "permalink" $imageValue) }} {{ end }} {{ end }}