summaryrefslogtreecommitdiffstats
path: root/app/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/user.go')
-rw-r--r--app/user.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/user.go b/app/user.go
index 2a570c7ac..e5cc20568 100644
--- a/app/user.go
+++ b/app/user.go
@@ -805,6 +805,11 @@ func SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppE
return model.NewLocAppError("SetProfileImage", "api.user.upload_profile_user.decode.app_error", nil, err.Error())
}
+ file.Seek(0, 0)
+
+ orientation, _ := getImageOrientation(file)
+ img = makeImageUpright(img, orientation)
+
// Scale profile image
img = imaging.Fill(img, utils.Cfg.FileSettings.ProfileWidth, utils.Cfg.FileSettings.ProfileHeight, imaging.Center, imaging.Lanczos)