From a3ca551b5ebad74a300c94ca312b50eff373c00f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 1 Dec 2020 19:29:51 +0000 Subject: [PATCH] Try anything as a resource, and fall back if not available --- layouts/_default/_markup/render-image.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 51a247d..4c8274d 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,7 +1,8 @@ {{ $destination := .Destination }} -{{ if not (hasPrefix .Destination "http") }} - {{ $resource := .Page.Resources.GetMatch $destination }} +{{ $resource := .Page.Resources.GetMatch $destination }} + +{{ if $resource }} {{ $destination = ($resource.Resize "1500x").RelPermalink }} {{ end }}