summaryrefslogtreecommitdiffstats
path: root/resources/image_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-10-04 11:00:07 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-10-04 15:38:12 +0200
commit3a9cb7b0fb1da71f1c051340bf746f29ab39cd7f (patch)
tree784b33a60614995d61a217e5cac50901e1b4095b /resources/image_test.go
parent0addb302ac87531a107b07991616b21c8b8e6a48 (diff)
resources/images: Fix 2 animated GIF resize issues
* Fix resize of animated GIF when target != GIF * Avoid processing all GIF frames if targetFormat != GIF Fixes #10354
Diffstat (limited to 'resources/image_test.go')
-rw-r--r--resources/image_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/image_test.go b/resources/image_test.go
index 111ce66db..75a20f156 100644
--- a/resources/image_test.go
+++ b/resources/image_test.go
@@ -620,6 +620,8 @@ func TestImageOperationsGolden(t *testing.T) {
// Note, if you're enabling this on a MacOS M1 (ARM) you need to run the test with GOARCH=amd64.
// GOARCH=amd64 go test -timeout 30s -run "^TestImageOperationsGolden$" ./resources -v
+ // The above will print out a folder.
+ // Replace testdata/golden with resources/_gen/images in that folder.
devMode := false
testImages := []string{"sunset.jpg", "gohugoio8.png", "gohugoio24.png"}
@@ -663,7 +665,7 @@ func TestImageOperationsGolden(t *testing.T) {
// Animated GIF
orig = fetchImageForSpec(spec, c, "giphy.gif")
- for _, resizeSpec := range []string{"200x", "512x"} {
+ for _, resizeSpec := range []string{"200x", "512x", "100x jpg"} {
resized, err := orig.Resize(resizeSpec)
c.Assert(err, qt.IsNil)
rel := resized.RelPermalink()