From a13b8182e9c0c913490bb1ee14420748adb5796f Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Thu, 11 Jan 2018 22:17:06 +0530 Subject: [PATCH] FIX: rescue login required / broken images --- lib/cooked_post_processor.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index 5cc187a4902..3582a42e464 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -237,7 +237,8 @@ class CookedPostProcessor return unless SiteSetting.crawl_images? || Discourse.store.has_been_uploaded?(url) @size_cache[url] = FastImage.size(absolute_url) - rescue Zlib::BufError # FastImage.size raises BufError for some gifs + rescue Zlib::BufError, URI::InvalidURIError, URI::InvalidComponentError + # FastImage.size raises BufError for some gifs, leave it. end def is_valid_image_url?(url)