shortcode img can't handle SVG
n-arakawa opened this issue · comments
n-arakawa commented
This is just a edge case.
{{<img name="sample.svg">}}
=>
failed to render shortcode "img": failed to process shortcode: "/tmp/site/themes/hugo-geekdoc/layouts/shortcodes/img.html:10:19": execute of template failed at <.Fill>: error calling Fill: this method is only available for raster images. To determine if an image is SVG, you can do {{ if eq .MediaType.SubType "svg" }}{{ end }}
Robert Kaussow commented
Basic support to render SVG via the img
shortcode added with the linked PR. As handling the size of SVG images dynamically is quite difficult, the support is limited.