Is there a way to set the "effort" option when composing GIFs?
Question about an existing feature
What are you trying to achieve?
I'm trying to reduce the time my composing method call takes but I'm not sure how the effort can be lowered in this case.
When you searched for similar issues, what did you find that might be related?
This issue is similar but they're not using composite.
https://github.com/lovell/sharp/issues/3176
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question
// A set of GIFs and JPEGs
const frames = [...];
const gif = await sharp(animatedGif, { animated: true })
.composite(frames)
.toBuffer();
Please provide sample image(s) that help explain this question
N/A
Hi, did you see the effort option of gif()?
https://sharp.pixelplumbing.com/api-output#gif
Yea but doing something like:
const gif = await sharp(animatedGif, { animated: true })
.composite(frames)
.gif({ effort: 1 })
.toBuffer();
Didn't make a difference so want sure if I was doing it wrong
If you're still having problems, perhaps you could create a standalone repo with all input images and minimal source code that allows someone else to reproduce.
GIF re-encoding should be ~20% faster in the forthcoming sharp v0.31.0 as the input palette will be re-used.
I'll close this for now, but please feel free to re-open with an example repo that allows someone else to reproduce if you still require help.