bb
This commit is contained in:
parent
c076e7abac
commit
60163c8c5b
2 changed files with 4 additions and 4 deletions
|
@ -73,7 +73,7 @@ r=redis.Redis(host=environ.get("REDIS_URL", "redis://localhost"), decode_respons
|
|||
limiter = Limiter(
|
||||
app,
|
||||
key_func=get_ipaddr,
|
||||
default_limits=["3/second;30/minute;100/hour;500/day"],
|
||||
default_limits=["3/second;30/minute;200/hour;500/day"],
|
||||
headers_enabled=True,
|
||||
strategy="fixed-window"
|
||||
)
|
||||
|
|
|
@ -19,9 +19,9 @@ def process_image(filename=None, resize=False):
|
|||
|
||||
om = next(frames)
|
||||
om.info = i.info
|
||||
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0)
|
||||
om.save(filename, format="WEBP", save_all=True, append_images=list(frames), loop=0, lossless=True, quality=100, method=6)
|
||||
elif i.format.lower() != "webp":
|
||||
if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-q 100")
|
||||
else: i.save(filename, format="WEBP")
|
||||
if i.format.lower() == "gif": gifwebp(input_image=filename, output_image=filename, option="-q 100 -m 6 -metadata 'none' -mt")
|
||||
else: i.save(filename, format="WEBP", lossless=True, quality=100, method=6)
|
||||
|
||||
return f'/static{filename}'
|
Loading…
Add table
Add a link
Reference in a new issue