mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 20:45:53 +08:00
FIX: rescue login required / broken images
This commit is contained in:
parent
f752c22104
commit
a13b8182e9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user