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 }}