PIL has limited support for animated GIFs, but it is said to be limited, and you need to work at a very low level to deal with it.
I would suggest trying a different image scaling method than PIL if you want to deal with animated gifs. Perhaps the easiest way is to use an out-of-process ImageMagick with the .Popen subprocess - (and even then, at this time, I just assume that ImageMagick is "doing the right thing" with animated GIFs) -
The option is to have an "image processing server" with a different Python script, besides your zope installation, which will receive requests for image scaling - perhaps by calling xmlrpc - you can build it like a GIMP-plug -in and use GIMP to scale GIF.
Another option is to leave things as they are and use โstill imagesโ for the animated GIF, where they should appear in a different dimension than the original, and display the original image in which the animation fits. (Or just ask the animated gif to be presented in the correct size)
source share