diff --git a/themes/nluug/layouts/partials/show-image.html b/themes/nluug/layouts/partials/show-image.html index 292e23a..1c8e4bb 100644 --- a/themes/nluug/layouts/partials/show-image.html +++ b/themes/nluug/layouts/partials/show-image.html @@ -3,6 +3,7 @@ {{ $isJPG := eq (path.Ext .image) ".jpg" }} {{ $isPNG := eq (path.Ext .image) ".png" }} + {{ $isSVG := eq (path.Ext .image) ".svg" }} {{ if ($isJPG) -}} {{ $webpPath:= replace .image ".jpg" ".webp" }} @@ -21,9 +22,13 @@ {{- end }} {{- end }} - {{ $img := imageConfig (add "/static" (.image | safeURL)) }} - {{ .alt }} + {{ if or ($isJPG) ($isPNG) }} + {{ $img := imageConfig (add "/static" (.image | safeURL)) }} + {{ .alt }} + {{ else if ($isSVG) }} + {{ .alt }} + {{ end }} {{ if .figcaption }}