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 }}
+{{ else if and (.Get "width") (.Get "height") }}
+
{{ else }}
-
+
{{ end }}
{{- if or $lightbox (.Get "link") }}{{ end }}