From 7b4470ebb55f71cd24dfc73e285e3c449fe8d75f Mon Sep 17 00:00:00 2001 From: George Cushen Date: Fri, 24 Jan 2020 02:08:50 +0000 Subject: [PATCH] fix: 55228b7ade0412796bae15eb122307ebd166d68a Fix figure images not loading when not within page bundle. --- layouts/shortcodes/figure.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index e4941b07..663273e0 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -29,8 +29,10 @@ {{/* Lazy load only when we know image dimensions in order to preserve anchor linking. */}} {{ if $asset }} {{ with .Get +{{ else if and (.Get "width") (.Get "height") }} + {{ with .Get {{ else }} - {{ with .Get + {{ with .Get {{ end }} {{- if or $lightbox (.Get "link") }}{{ end }}