diff --git a/wowchemy/layouts/shortcodes/figure.html b/wowchemy/layouts/shortcodes/figure.html
index 74eb7f47..fcf81b5a 100644
--- a/wowchemy/layouts/shortcodes/figure.html
+++ b/wowchemy/layouts/shortcodes/figure.html
@@ -26,9 +26,9 @@
{{- if $img -}}
- {{ $isSVG := eq $img.MediaType.SubType "svg" }}
- {{ $isGIF := eq $img.MediaType.SubType "gif" }}
- {{ if $isSVG | or $isGIF -}}
+ {{- $isSVG := eq $img.MediaType.SubType "svg" -}}
+ {{- $isGIF := eq $img.MediaType.SubType "gif" -}}
+ {{- if $isSVG | or $isGIF -}}
