File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,17 @@ private function proceedSingleUpload($file)
66
66
67
67
event (new ImageIsUploading ($ new_file_path ));
68
68
try {
69
- if (parent ::fileIsImage ($ file )) {
70
- // File is an image
71
- // Process & compress the image
69
+ if (parent ::fileIsImage ($ file ) && !in_array ($ file ->getMimeType (), ['image/gif ' , 'image/svg+xml ' ])) {
70
+ // Handle image rotation
72
71
Image::make ($ file ->getRealPath ())
73
72
->orientate () //Apply orientation from exif data
74
- ->save ($ new_file_path, 90 );
73
+ ->save ($ new_file_path );
75
74
76
75
// Generate a thumbnail
77
76
if (parent ::imageShouldHaveThumb ($ file )) {
78
77
$ this ->makeThumb ($ new_filename );
79
78
}
80
79
} else {
81
- // File is not an image
82
80
// Create (move) the file
83
81
File::move ($ file ->getRealPath (), $ new_file_path );
84
82
}
You can’t perform that action at this time.
0 commit comments