fix:减小图片分辨率 修复小图片被放大的问题

This commit is contained in:
2024-05-09 12:17:16 +08:00
parent 591bf9d5d8
commit c49cee4c30
2 changed files with 13 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ def img(bookid, index): # 图片接口
if request.args.get("mini") == "yes":
data = file.thumbnail(data)
else:
data = file.thumbnail(data,2400)
data = file.thumbnail(data,1500)
response = make_response(data) # 读取文件
del data
response.headers.set("Content-Type", "image/Webp")