mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Do not downsize or crop GIF images (#10989)
It was a problem because during this operation only the first frame is kept. This commit removes the alternative solution to check if a GIF image is animated.
This commit is contained in:
@@ -497,4 +497,20 @@ RSpec.describe UploadCreator do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#should_downsize?' do
|
||||
context "GIF image" do
|
||||
let(:gif_file) { file_from_fixtures("animated.gif") }
|
||||
|
||||
before do
|
||||
SiteSetting.max_image_size_kb = 1
|
||||
end
|
||||
|
||||
it "is not downsized" do
|
||||
creator = UploadCreator.new(gif_file, "animated.gif")
|
||||
creator.extract_image_info!
|
||||
expect(creator.should_downsize?).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user