From e997cc7b772ac4c05e5e52f4a7ef071f5f8bc805 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 27 Feb 2018 22:05:35 -0500 Subject: [PATCH] add more image extensions to downsize_uploads.rb --- script/downsize_uploads.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/downsize_uploads.rb b/script/downsize_uploads.rb index 0239008a1a4..342b2ae24f3 100644 --- a/script/downsize_uploads.rb +++ b/script/downsize_uploads.rb @@ -5,7 +5,7 @@ max_image_pixels = [ARGV[0].to_i, 1_000_000].max puts '', "Downsizing uploads size to no more than #{max_image_pixels} pixels" -Upload.where("lower(extension) in (?)", ['jpg', 'gif', 'png']).find_each do |upload| +Upload.where("lower(extension) in (?)", ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'tif', 'tiff']).find_each do |upload| absolute_path = Discourse.store.path_for(upload) if absolute_path && FileHelper.is_image?(upload.original_filename) file = File.new(absolute_path) rescue nil