Performance: GZip, Cache-Control, WebP, SQLite-Tuning, Indizes, srcset — SW by-v438, APP_VER 417

This commit is contained in:
rene 2026-04-26 17:40:18 +02:00
parent 5bd07d9598
commit e0c2b2bdc1
10 changed files with 46 additions and 12 deletions

View file

@ -90,7 +90,7 @@ def _save_upload(file: UploadFile, data: bytes) -> str:
else:
preview_bytes = generate_preview(data, ext)
if preview_bytes:
with open(os.path.splitext(path)[0] + "_preview.jpg", "wb") as f:
with open(os.path.splitext(path)[0] + "_preview.webp", "wb") as f:
f.write(preview_bytes)
return f"/media/forum/{filename}"