Skip to content

Commit

Permalink
Don't postprocess animated GIFs (Fix Issue #2750)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed May 10, 2017
1 parent 77ddb6f commit 4741c8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nikola/image_processing.py
Expand Up @@ -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
Expand Down

0 comments on commit 4741c8d

Please sign in to comment.