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)