🔀 Merge pull request #427 from kpavlov/patch-1

🐛 Fix render-image.html for SVG
This commit is contained in:
James Panther
2023-01-09 16:43:27 +11:00
committed by GitHub
@@ -15,6 +15,13 @@
{{ end }} {{ end }}
{{ with $resource }} {{ with $resource }}
<figure> <figure>
{{ if eq .MediaType.SubType "svg" }}
<img
class="my-0 rounded-md"
src="{{ .RelPermalink }}"
alt="{{ $altText }}"
/>
{{ else }}
<img <img
class="my-0 rounded-md" class="my-0 rounded-md"
srcset=" srcset="
@@ -25,6 +32,7 @@
src="{{ (.Resize "660x").RelPermalink }}" src="{{ (.Resize "660x").RelPermalink }}"
alt="{{ $altText }}" alt="{{ $altText }}"
/> />
{{ end }}
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }} {{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
</figure> </figure>
{{ else }} {{ else }}