mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 13:44:58 +08:00
Correct image orientation according to Exif data
When using mobile, take a photo and upload it as avatar, it's orientation is incorrect. This commit will fix this problem.
This commit is contained in:
parent
9416d16ebb
commit
6a532ec14e
|
@ -101,7 +101,7 @@ class UploadAvatarHandler
|
|||
$manager = new ImageManager;
|
||||
|
||||
// Explicitly tell Intervention to encode the image as JSON (instead of having to guess from the extension)
|
||||
$encodedImage = $manager->make($tmpFile)->fit(100, 100)->encode('jpg', 100);
|
||||
$encodedImage = $manager->make($tmpFile)->orientate()->fit(100, 100)->encode('jpg', 100);
|
||||
file_put_contents($tmpFile, $encodedImage);
|
||||
|
||||
$this->events->fire(
|
||||
|
|
Loading…
Reference in New Issue
Block a user