We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9eed2ab commit ede746bCopy full SHA for ede746b
themes/aoepeople.github.io/layouts/shortcodes/picture.html
@@ -1,8 +1,8 @@
1
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
2
{{ $alt := (.Get "alt") }}
3
4
-{{ if strings.HasSuffix (.Get "src") "svg" }}
5
- <img src="{{ $src }}" />
+{{ if or (strings.HasSuffix (.Get "src") "svg") (strings.HasSuffix (.Get "src") "gif") }}
+ <img src="{{ $src }}" alt="{{ $alt }}" />
6
{{ else }}
7
<picture>
8
{{ if hugo.IsExtended }}
0 commit comments