diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-06-14 08:14:39 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-06-14 09:21:22 +0200 |
commit | 21d17566a3c21a33e78a6aa0bec9c82687eea6fb (patch) | |
tree | 02941bbe7c4a99a6b79836ec324d03552be8e90d /resources/image_test.go | |
parent | 35e9b3ed1ef96452fc6c721c6022862d2cf3bc70 (diff) | |
download | hugo-21d17566a3c21a33e78a6aa0bec9c82687eea6fb.tar.gz hugo-21d17566a3c21a33e78a6aa0bec9c82687eea6fb.zip |
Fix .Width and .Height for animated gifs
Fixes #11079
Diffstat (limited to 'resources/image_test.go')
-rw-r--r-- | resources/image_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/image_test.go b/resources/image_test.go index 779bacf71..de32f0628 100644 --- a/resources/image_test.go +++ b/resources/image_test.go @@ -658,11 +658,12 @@ func TestImageOperationsGolden(t *testing.T) { // A simple Gif file (no animation). orig := fetchImageForSpec(spec, c, "gohugoio-card.gif") - for _, resizeSpec := range []string{"100x", "220x"} { - resized, err := orig.Resize(resizeSpec) + for _, width := range []int{100, 220} { + resized, err := orig.Resize(fmt.Sprintf("%dx", width)) c.Assert(err, qt.IsNil) rel := resized.RelPermalink() c.Assert(rel, qt.Not(qt.Equals), "") + c.Assert(resized.Width(), qt.Equals, width) } // Animated GIF |