🐛 Fix animated GIFs are static when enableImageWebp is set

Fixes: #866
This commit is contained in:
James Panther
2024-05-01 17:03:04 +10:00
parent 7ff80aabbe
commit 05e5e8b700
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Featured images overlap page title when article metadata hidden ([#827](https://github.com/jpanther/congo/issues/827)) - Featured images overlap page title when article metadata hidden ([#827](https://github.com/jpanther/congo/issues/827))
- Inconsistent picture rendering between `figure` shortcode and Markdown render hook ([#828](https://github.com/jpanther/congo/issues/828)) - Inconsistent picture rendering between `figure` shortcode and Markdown render hook ([#828](https://github.com/jpanther/congo/issues/828))
- Animated GIF files are static when `enableImageWebp` is enabled ([#866](https://github.com/jpanther/congo/issues/866))
## [2.8.2] - 2024-04-17 ## [2.8.2] - 2024-04-17
+1 -1
View File
@@ -53,7 +53,7 @@
{{ $width = div .Width 2 }} {{ $width = div .Width 2 }}
{{ $height = div .Height 2 }} {{ $height = div .Height 2 }}
{{ end }} {{ end }}
{{ if $webp }} {{ if and $webp (ne .MediaType.SubType "gif") }}
<source <source
{{ if lt .Width 660 }} {{ if lt .Width 660 }}
{{ with .Resize (printf "%dx%d webp" .Width .Height) }} {{ with .Resize (printf "%dx%d webp" .Width .Height) }}