From 631ed3df58585d0bf7a8d500dfee9f92087b9863 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 23 Apr 2013 14:08:05 -0400 Subject: [PATCH] Checking size of some gifs throws a Zlib::BufError. Tolerate it until we can figure out why. --- lib/cooked_post_processor.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index a9372135c8b..416d8df9e24 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -161,6 +161,9 @@ class CookedPostProcessor # return nil when it's an external image *and* crawling is disabled return nil unless SiteSetting.crawl_images? || uri[0] == "/" @size_cache[uri] ||= FastImage.size(uri) + rescue Zlib::BufError + # FastImage.size raises BufError for some gifs + return nil end def get_image_uri(url)