So my web host won't install gifsicle
on their shared servers, so I'm stuck with ImageMagick. I want to compress the images like it is here: https://pornel.net/lossygif how can I do that without using gifsicle
; using only ImageMagick?
Right now my exec()
command goes like:
exec("convert $animation -coalesce -gravity SouthWest -geometry +0+0 null: $watermark -layers composite -layers optimize $animation");
and the watermarked GIF barely compresses, and sometimes it even gets larger. How could I solve this issue?
I had success with ImageMagick's Mogrify: https://www.imagemagick.org/script/mogrify.php
After you generate a large gif, you can make it smaller.
My command looked like:
mogrify -layers 'optimize' -fuzz 7% mygif.gif
The -layers
option optimized any layers in your gif
The biggest space savings comes from the -fuzz
option, which specifies that colors within a certain tolerance can be considered the same color.
My several second gifs went from 3 MB to a few hundred kb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With