From 05e5e8b700b7e4dcfef0f180a6d2287fc5a0f119 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 1 May 2024 17:03:04 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20animated=20GIFs=20are=20st?= =?UTF-8?q?atic=20when=20`enableImageWebp`=20is=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #866 --- CHANGELOG.md | 1 + layouts/partials/picture.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e94788..e27415c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) - 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 diff --git a/layouts/partials/picture.html b/layouts/partials/picture.html index a843f15..ddca360 100644 --- a/layouts/partials/picture.html +++ b/layouts/partials/picture.html @@ -53,7 +53,7 @@ {{ $width = div .Width 2 }} {{ $height = div .Height 2 }} {{ end }} - {{ if $webp }} + {{ if and $webp (ne .MediaType.SubType "gif") }}