diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md
index 2222eb96..d99718d8 100644
--- a/exampleSite/content/docs/shortcodes/index.md
+++ b/exampleSite/content/docs/shortcodes/index.md
@@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
| Parameter | Description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `icon` | **Optional.** the icon to display on the left side.
**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) |
+| `icon` | **Optional.** the icon to display on the left side.
**Default:** `triangle-exclamation` (Check out the [icon shortcode](#icon) for more details on using icons.) |
| `iconColor` | **Optional.** the color for the icon in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . |
| `cardColor` | **Optional.** the color for the card background in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . |
| `textColor` | **Optional.** the color for the text in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . |
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index db9ebd2f..3e5fdce8 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,29 +1,29 @@
-{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
-{{ $url := urls.Parse .Destination }}
-{{ $altText := .Text }}
-{{ $caption := .Title }}
-{{ if findRE "^https?" $url.Scheme }}
+{{- $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
+{{- $url := urls.Parse .Destination }}
+{{- $altText := .Text }}
+{{- $caption := .Title }}
+{{- if findRE "^https?" $url.Scheme }}
{{ with $caption }}{{ . | markdownify }}{{ end }}
-{{ else }}
- {{ $resource := "" }}
- {{ if $.Page.Resources.GetMatch ($url.String) }}
- {{ $resource = $.Page.Resources.GetMatch ($url.String) }}
- {{ else if resources.GetMatch ($url.String) }}
- {{ $resource = resources.Get ($url.String) }}
- {{ end }}
- {{ with $resource }}
+{{- else }}
+ {{- $resource := "" }}
+ {{- if $.Page.Resources.GetMatch ($url.String) }}
+ {{- $resource = $.Page.Resources.GetMatch ($url.String) }}
+ {{- else if resources.GetMatch ($url.String) }}
+ {{- $resource = resources.Get ($url.String) }}
+ {{- end }}
+ {{- with $resource }}
- {{ if $disableImageOptimization }}
+ {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
- {{ else }}
+ {{- else }}
- {{ end }}
+ {{- end }}
{{ with $caption }}{{ . | markdownify }}{{ end }}
- {{ else }}
+ {{- else }}
{{ with $caption }}{{ . | markdownify }}{{ end }}
- {{ end }}
-{{ end }}
+ {{- end }}
+{{- end }}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index 83361695..b6028bf5 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,2 +1,7 @@
-
- {{ .Text | safeHTML }}
\ No newline at end of file
+
+ {{- .Text | safeHTML -}}
+
\ No newline at end of file
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
index cd881a31..fb7293c8 100644
--- a/layouts/shortcodes/figure.html
+++ b/layouts/shortcodes/figure.html
@@ -2,49 +2,49 @@
{{ if .Get "default" }}
{{ template "_internal/shortcodes/figure.html" . }}
{{ else }}
- {{ $url := urls.Parse (.Get "src") }}
- {{ $altText := .Get "alt" }}
- {{ $caption := .Get "caption" }}
- {{ $href := .Get "href" }}
- {{ $class := .Get "class" }}
- {{ $target := .Get "target" | default "_blank" }}
- {{ $nozoom := .Get "nozoom" | default false }}
+ {{- $url := urls.Parse (.Get "src") }}
+ {{- $altText := .Get "alt" }}
+ {{- $caption := .Get "caption" }}
+ {{- $href := .Get "href" }}
+ {{- $class := .Get "class" }}
+ {{- $target := .Get "target" | default "_blank" }}
+ {{- $nozoom := .Get "nozoom" | default false -}}
- {{ with $href }}{{ end }}
- {{ if findRE "^https?" $url.Scheme }}
-
- {{ else }}
- {{ $resource := "" }}
- {{ if $.Page.Resources.GetMatch ($url.String) }}
- {{ $resource = $.Page.Resources.GetMatch ($url.String) }}
- {{ else if resources.GetMatch ($url.String) }}
- {{ $resource = resources.Get ($url.String) }}
- {{ end }}
- {{ with $resource }}
- {{ if $disableImageOptimization }}
-
- {{ else }}
-
- {{ end }}
- {{ else }}
-
- {{ end }}
- {{ end }}
+ {{- with $href }}{{ end -}}
+ {{- if findRE "^https?" $url.Scheme }}
+
+ {{- else }}
+ {{- $resource := "" }}
+ {{- if $.Page.Resources.GetMatch ($url.String) }}
+ {{- $resource = $.Page.Resources.GetMatch ($url.String) }}
+ {{- else if resources.GetMatch ($url.String) }}
+ {{- $resource = resources.Get ($url.String) }}
+ {{- end }}
+ {{- with $resource }}
+ {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
+
+ {{- else }}
+
+ {{- end }}
+ {{- else }}
+
+ {{- end }}
+ {{- end }}
{{ with $caption }}{{ . | markdownify }}{{ end }}
{{ if $href }}{{ end }}
-{{ end }}
+{{- end -}}