FIX: do not treat TIFF, BMP, WEBP as images

Treating TIFF and BMP as images cause us to add them to IMG tags, this is very inconsistent across browsers.

You can still upload these files they will simply not be displayed in IMG tags.
This commit is contained in:
Penar Musaraj
2019-02-11 00:28:43 -05:00
committed by Sam
parent 84a10f8212
commit c50db76f5d
6 changed files with 18 additions and 23 deletions

View File

@ -7,7 +7,7 @@ puts '', "Downsizing uploads size to no more than #{max_image_pixels} pixels"
count = 0
Upload.where("lower(extension) in (?)", ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'tif', 'tiff']).find_each do |upload|
Upload.where("lower(extension) in (?)", ['jpg', 'jpeg', 'gif', 'png']).find_each do |upload|
count += 1
print "\r%8d".freeze % count
absolute_path = Discourse.store.path_for(upload)