summaryrefslogtreecommitdiffstats
path: root/app/user.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-05-03 09:08:00 -0400
committerChristopher Speller <crspeller@gmail.com>2017-05-03 09:08:00 -0400
commit1c8fdb4cdd3469d49fcd5a051d1e92111e87162d (patch)
treec15db458d272a0b77a5aab1ce07088ceb4d5ccd8 /app/user.go
parentb509f65b8eb552f0df821d7e67e69044847f9470 (diff)
downloadchat-1c8fdb4cdd3469d49fcd5a051d1e92111e87162d.tar.gz
chat-1c8fdb4cdd3469d49fcd5a051d1e92111e87162d.tar.bz2
chat-1c8fdb4cdd3469d49fcd5a051d1e92111e87162d.zip
PLT-6277 Moved profile image cropping to server (#6269)
* PLT-6277 Moved profile image cropping to server * Cosmetic refactoring of SettingPicture component
Diffstat (limited to 'app/user.go')
-rw-r--r--app/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/user.go b/app/user.go
index 3d33fb317..44e1ce3f6 100644
--- a/app/user.go
+++ b/app/user.go
@@ -805,7 +805,7 @@ func SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppE
}
// Scale profile image
- img = imaging.Resize(img, utils.Cfg.FileSettings.ProfileWidth, utils.Cfg.FileSettings.ProfileHeight, imaging.Lanczos)
+ img = imaging.Fill(img, utils.Cfg.FileSettings.ProfileWidth, utils.Cfg.FileSettings.ProfileHeight, imaging.Center, imaging.Lanczos)
buf := new(bytes.Buffer)
err = png.Encode(buf, img)