From 5e8d30c305b0c8a9bf3338a10e827441425e76d0 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Wed, 28 Dec 2022 10:31:55 +0200 Subject: [PATCH] Fix render-image.html for SVG SVG images do not support resizing, so `srcset/src` attributes should be simplified --- layouts/_default/_markup/render-image.html | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 723c1dc2..96f30901 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -15,16 +15,24 @@ {{ end }} {{ with $resource }}
- {{ $altText }} + {{ if eq .MediaType.SubType "svg" }} + {{ $altText }} + {{ else }} + {{ $altText }} + {{ end }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
{{ else }}