Checking size of some gifs throws a Zlib::BufError. Tolerate it until we can figure out why.
This commit is contained in:
parent
2e8e4b7c6e
commit
631ed3df58
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue