Allow uploading a banner image

This commit is contained in:
2024-10-27 07:21:36 +01:00
parent 19b390cbbb
commit 343022273c
11 changed files with 274 additions and 140 deletions

View File

@ -36,7 +36,7 @@ func SaveImage(c *Config, src io.Reader) (string, error) {
}
defer file.Close()
if err = webp.Encode(file, img, &webp.Options{Lossless: true}); err != nil {
if err = webp.Encode(file, img, &webp.Options{Quality: 80}); err != nil {
return "", fmt.Errorf("error encoding image as webp: %v", err)
}