Obtained from:	https://github.com/haiwen/seahub/commit/cbe0817f2bee0c2b00d3ffd3e047c3141862c6c5

--- seahub/avatar/settings.py.orig	2022-11-30 03:34:16 UTC
+++ seahub/avatar/settings.py
@@ -22,7 +22,7 @@ AUTO_GENERATE_GROUP_AVATAR_SIZES = getattr(settings, '

 ### Common settings ###
 AVATAR_FILE_STORAGE = getattr(settings, 'AVATAR_FILE_STORAGE', '')
-AVATAR_RESIZE_METHOD = getattr(settings, 'AVATAR_RESIZE_METHOD', Image.ANTIALIAS)
+AVATAR_RESIZE_METHOD = getattr(settings, 'AVATAR_RESIZE_METHOD', Image.Resampling.LANCZOS)
 AVATAR_GRAVATAR_BACKUP = getattr(settings, 'AVATAR_GRAVATAR_BACKUP', True)
 AVATAR_GRAVATAR_DEFAULT = getattr(settings, 'AVATAR_GRAVATAR_DEFAULT', None)
 AVATAR_MAX_AVATARS_PER_USER = getattr(settings, 'AVATAR_MAX_AVATARS_PER_USER', 42)
--- seahub/thumbnail/utils.py.orig	2022-11-30 03:34:16 UTC
+++ seahub/thumbnail/utils.py
@@ -54,22 +54,22 @@ def get_rotated_image(image):

     if orientation == 2:
         # Vertical image
-        image = image.transpose(Image.FLIP_LEFT_RIGHT)
+        image = image.transpose(Image.Transpose.FLIP_LEFT_RIGHT)
     elif orientation == 3:
         # Rotation 180
         image = image.rotate(180)
     elif orientation == 4:
-        image = image.rotate(180).transpose(Image.FLIP_LEFT_RIGHT)
+        image = image.rotate(180).transpose(Image.Transpose.FLIP_LEFT_RIGHT)
         # Horizontal image
     elif orientation == 5:
         # Horizontal image + Rotation 90 CCW
-        image = image.rotate(-90, expand=True).transpose(Image.FLIP_LEFT_RIGHT)
+        image = image.rotate(-90, expand=True).transpose(Image.Transpose.FLIP_LEFT_RIGHT)
     elif orientation == 6:
         # Rotation 270
         image = image.rotate(-90, expand=True)
     elif orientation == 7:
         # Horizontal image + Rotation 270
-        image = image.rotate(90, expand=True).transpose(Image.FLIP_LEFT_RIGHT)
+        image = image.rotate(90, expand=True).transpose(Image.Transpose.FLIP_LEFT_RIGHT)
     elif orientation == 8:
         # Rotation 90
         image = image.rotate(90, expand=True)
@@ -230,7 +230,7 @@ def _create_thumbnail_common(fp, thumbnail_file, size)
         image = image.convert("RGB")

     image = get_rotated_image(image)
-    image.thumbnail((size, size), Image.ANTIALIAS)
+    image.thumbnail((size, size), Image.Resampling.LANCZOS)
     image.save(thumbnail_file, THUMBNAIL_EXTENSION)
     return (True, 200)
