mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
no need to resize SVG images
This commit is contained in:
parent
9f5bae4ef4
commit
c652b45627
1 changed files with 2 additions and 0 deletions
|
@ -998,6 +998,8 @@ def make_image_sizes_async(file_id, thumbnail_width, medium_width, directory):
|
||||||
|
|
||||||
if file_ext == '.jpeg':
|
if file_ext == '.jpeg':
|
||||||
file_ext = '.jpg'
|
file_ext = '.jpg'
|
||||||
|
elif file_ext == '.svg+xml':
|
||||||
|
return # no need to resize SVG images
|
||||||
else:
|
else:
|
||||||
file_ext = os.path.splitext(file.source_url)[1]
|
file_ext = os.path.splitext(file.source_url)[1]
|
||||||
file_ext = file_ext.replace('%3f', '?') # sometimes urls are not decoded properly
|
file_ext = file_ext.replace('%3f', '?') # sometimes urls are not decoded properly
|
||||||
|
|
Loading…
Add table
Reference in a new issue