Skip to content
Permalink
Browse files

Don't postprocess animated GIFs (Fix Issue #2750)

  • Loading branch information
ralsina committed May 10, 2017
1 parent 77ddb6f commit 4741c8dac18249129ad95fe22b10797f384d306e
Showing with 6 additions and 0 deletions.
  1. +6 −0 nikola/image_processing.py
@@ -98,6 +98,12 @@ def resize_image(self, src, dst, max_size, bigger_panoramas=True, preserve_exif_
self.resize_svg(src, dst, max_size, bigger_panoramas)
return
im = Image.open(src)

if hasattr(im, 'n_frames') and im.n_frames > 1:
# Animated gif, leave as-is
utils.copy_file(src, dst)
return

size = w, h = im.size
if w > max_size or h > max_size:
size = max_size, max_size

0 comments on commit 4741c8d

Please sign in to comment.
You can’t perform that action at this time.