always resize images

This commit is contained in:
bakatrouble 2023-08-13 22:30:21 +03:00
parent e83c970717
commit 2fd30ea5d0

View File

@ -83,7 +83,7 @@ async def send_post(post: E621Post, tag_list: List[str]):
src_path.unlink() src_path.unlink()
mp4_path.unlink() mp4_path.unlink()
elif post.file.ext in ('png', 'jpg'): elif post.file.ext in ('png', 'jpg'):
if post.file.size > 10000000: # if post.file.size > 10000000:
logging.warning('compressing') logging.warning('compressing')
dl_im = Image.open(file).convert('RGBA') dl_im = Image.open(file).convert('RGBA')
size = dl_im.size size = dl_im.size