From fe0680d58705c0e7ee474ef1c8135fc795039062 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 18 Mar 2023 22:51:54 +0100 Subject: [PATCH] fix: crop avatars to square --- backend/db/avatars.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/db/avatars.go b/backend/db/avatars.go index ae4bd9c..e419c6f 100644 --- a/backend/db/avatars.go +++ b/backend/db/avatars.go @@ -16,8 +16,8 @@ import ( ) var ( - webpArgs = []string{"-resize", "512x512", "-quality", "80", "webp:-"} - jpgArgs = []string{"-resize", "512x512", "-quality", "80", "jpg:-"} + webpArgs = []string{"-thumbnail", "512x512^", "-gravity", "center", "-extent", "512x512", "-quality", "90", "webp:-"} + jpgArgs = []string{"-thumbnail", "512x512^", "-gravity", "center", "-extent", "512x512", "-quality", "80", "jpg:-"} ) const ErrInvalidDataURI = errors.Sentinel("invalid data URI")