Skip to content

Commit ede746b

Browse files
committed
fix(picture): do not resize gifs
1 parent 9eed2ab commit ede746b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

themes/aoepeople.github.io/layouts/shortcodes/picture.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{{ $src := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
22
{{ $alt := (.Get "alt") }}
33

4-
{{ if strings.HasSuffix (.Get "src") "svg" }}
5-
<img src="{{ $src }}" />
4+
{{ if or (strings.HasSuffix (.Get "src") "svg") (strings.HasSuffix (.Get "src") "gif") }}
5+
<img src="{{ $src }}" alt="{{ $alt }}" />
66
{{ else }}
77
<picture>
88
{{ if hugo.IsExtended }}

0 commit comments

Comments
 (0)