We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d214e13 commit 13abe4dCopy full SHA for 13abe4d
src/controllers/UploadController.php
@@ -66,19 +66,17 @@ private function proceedSingleUpload($file)
66
67
event(new ImageIsUploading($new_file_path));
68
try {
69
- if (parent::fileIsImage($file)) {
70
- // File is an image
71
- // Process & compress the image
+ if (parent::fileIsImage($file) && !in_array($file->getMimeType(), ['image/gif', 'image/svg+xml'])) {
+ // Handle image rotation
72
Image::make($file->getRealPath())
73
->orientate() //Apply orientation from exif data
74
- ->save($new_file_path, 90);
+ ->save($new_file_path);
75
76
// Generate a thumbnail
77
if (parent::imageShouldHaveThumb($file)) {
78
$this->makeThumb($new_filename);
79
}
80
} else {
81
- // File is not an image
82
// Create (move) the file
83
File::move($file->getRealPath(), $new_file_path);
84
0 commit comments