diff --git a/src/Core/Command/UploadAvatarHandler.php b/src/Core/Command/UploadAvatarHandler.php index fda27fc3a..852b4c7b1 100644 --- a/src/Core/Command/UploadAvatarHandler.php +++ b/src/Core/Command/UploadAvatarHandler.php @@ -96,7 +96,10 @@ class UploadAvatarHandler $this->validator->assertValid(['avatar' => $file]); $manager = new ImageManager; - $manager->make($tmpFile)->fit(100, 100)->save(); + + $encodedImage = $manager->make($tmpFile)->fit(100, 100)->encode('jpg', 100); + + file_put_contents($tmpFile, $encodedImage); $this->events->fire( new AvatarWillBeSaved($user, $actor, $tmpFile)