mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
faster image resizing and smaller results
This commit is contained in:
@ -117,7 +117,11 @@ class Picture(SasFile):
|
||||
# meant to be shown on the website, but rather to keep the real image
|
||||
# for less frequent cases (like downloading the pictures of an user)
|
||||
extension = self.mime_type.split("/")[-1]
|
||||
file = resize_image(im, max(im.size), extension)
|
||||
# the HD version of the image doesn't need to be optimized, because :
|
||||
# - it isn't frequently queried
|
||||
# - optimizing large images takes a lot time, which greatly hinders the UX
|
||||
# - photographers usually already optimize their images
|
||||
file = resize_image(im, max(im.size), extension, optimize=False)
|
||||
thumb = resize_image(im, 200, "webp")
|
||||
compressed = resize_image(im, 1200, "webp")
|
||||
if overwrite:
|
||||
|
Reference in New Issue
Block a user