File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ private function proceedSingleUpload($file)
5555
5656 event (new ImageIsUploading ($ new_file_path ));
5757 try {
58- if (parent ::fileIsImage ($ file ) && ! parent ::imageShouldNotHaveThumb ($ file )) {
58+ if (parent ::fileIsImage ($ file ) && parent ::imageShouldHaveThumb ($ file )) {
5959 Image::make ($ file ->getRealPath ())
6060 ->orientate () //Apply orientation from exif data
6161 ->save ($ new_file_path , 90 );
Original file line number Diff line number Diff line change @@ -456,7 +456,7 @@ public function objectPresenter($item)
456456
457457 $ thumb_path = $ this ->getThumbPath ($ item_name );
458458 $ file_path = $ this ->getCurrentPath ($ item_name );
459- if ($ this ->imageShouldNotHaveThumb ($ file_path )) {
459+ if (! $ this ->imageShouldHaveThumb ($ file_path )) {
460460 $ thumb_url = $ this ->getFileUrl ($ item_name ) . '?timestamp= ' . filemtime ($ file_path );
461461 } elseif (File::exists ($ thumb_path )) {
462462 $ thumb_url = $ this ->getThumbUrl ($ item_name ) . '?timestamp= ' . filemtime ($ thumb_path );
@@ -527,15 +527,15 @@ public function fileIsImage($file)
527527 * @param mixed $file Real path of a file or instance of UploadedFile.
528528 * @return bool
529529 */
530- public function imageShouldNotHaveThumb ($ file )
530+ public function imageShouldHaveThumb ($ file )
531531 {
532532 if (! config ('lfm.should_create_thumbnails ' )) {
533- return true ;
533+ return false ;
534534 }
535535
536536 $ mime_type = $ this ->getFileType ($ file );
537537
538- return ! in_array ($ mime_type , config ('lfm.raster_mimetypes ' ));
538+ return in_array ($ mime_type , config ('lfm.raster_mimetypes ' ));
539539 }
540540
541541 /**
You can’t perform that action at this time.
0 commit comments