diff --git a/backend/handler/filesystem/resources_handler.py b/backend/handler/filesystem/resources_handler.py index 5fcbcba9c..4c13d0c54 100644 --- a/backend/handler/filesystem/resources_handler.py +++ b/backend/handler/filesystem/resources_handler.py @@ -38,8 +38,12 @@ class FSResourcesHandler(FSHandler): def resize_cover_to_small(cover_path: str): """Path of the cover image to resize""" cover = Image.open(cover_path) - small_width = int(cover.width * 0.1) - small_height = int(cover.height * 0.1) + if cover.height >= 1000: + ratio = 0.2 + else: + ratio = 0.4 + small_width = int(cover.width * ratio) + small_height = int(cover.height * ratio) small_size = (small_width, small_height) small_img = cover.resize(small_size) small_img.save(cover_path)