reduce resize values

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-09-26 03:15:36 +02:00
parent fca9cae3d8
commit 8fcc91a43e
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ def submit_marsey(v):
filename = f'/asset_submissions/marseys/{name}.webp'
copyfile(highquality, filename)
process_image(filename, resize=250, trim=True)
process_image(filename, resize=200, trim=True)
marsey = Marsey(name=name, author_id=author.id, tags=tags, count=0, submitter_id=v.id)
g.db.add(marsey)
@ -391,7 +391,7 @@ def update_marsey(v):
filename = f"files/assets/images/emojis/{name}.webp"
copyfile(new_path, filename)
process_image(filename, resize=250, trim=True)
process_image(filename, resize=200, trim=True)
requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS,
data=f'{{"files": ["https://{SITE}/e/{name}.webp", "https://{SITE}/assets/images/emojis/{name}.webp", "https://{SITE}/asset_submissions/marseys/original/{name}.{format}"]}}', timeout=5)

View File

@ -201,7 +201,7 @@ def comment(v):
num = int(li.split('.webp')[0]) + 1
filename = f'files/assets/images/{SITE_NAME}/sidebar/{num}.webp'
copyfile(oldname, filename)
process_image(filename, 600)
process_image(filename, resize=400)
elif parent_post.id == BANNER_THREAD:
li = sorted(os.listdir(f'files/assets/images/{SITE_NAME}/banners'),
key=lambda e: int(e.split('.webp')[0]))[-1]