diff --git a/app/models/post.rb b/app/models/post.rb index d8053308a..db7d27ba3 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -173,7 +173,7 @@ class Post < ActiveRecord::Base end def is_animated_gif? - if file_ext =~ /gif/i + if file_ext =~ /gif/i && File.exists?(file_path) return Magick::Image.ping(file_path).length > 1 else return false