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)
6666
6767 event (new ImageIsUploading ($ new_file_path ));
6868 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
7271 Image::make ($ file ->getRealPath ())
7372 ->orientate () //Apply orientation from exif data
74- ->save ($ new_file_path, 90 );
73+ ->save ($ new_file_path );
7574
7675 // Generate a thumbnail
7776 if (parent ::imageShouldHaveThumb ($ file )) {
7877 $ this ->makeThumb ($ new_filename );
7978 }
8079 } else {
81- // File is not an image
8280 // Create (move) the file
8381 File::move ($ file ->getRealPath (), $ new_file_path );
8482 }
You can’t perform that action at this time.
0 commit comments