no need to resize SVG images

This commit is contained in:
rimu 2024-06-28 13:09:31 +08:00
parent 9f5bae4ef4
commit c652b45627

View file

@ -998,6 +998,8 @@ def make_image_sizes_async(file_id, thumbnail_width, medium_width, directory):
if file_ext == '.jpeg':
file_ext = '.jpg'
elif file_ext == '.svg+xml':
return # no need to resize SVG images
else:
file_ext = os.path.splitext(file.source_url)[1]
file_ext = file_ext.replace('%3f', '?') # sometimes urls are not decoded properly