Skip to content

Commit

Permalink
Merge pull request #11 from zans-laksa/2244-magento-upgrade
Browse files Browse the repository at this point in the history
Fixed Slide Upload
  • Loading branch information
lianastaskevica authored Mar 26, 2021
2 parents af966fa + 34b0818 commit bdbb38a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Slide.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,12 @@ public function prepareImagesForSrcset($originalImagePath)
$newFileName = $fileNameParts['dirname'] . '/' .
$fileNameParts['filename'] . '-' . $size . 'w.' . $fileNameParts['extension'];

$imageInfo = getimagesize($originalImagePath);

$image
->fromFile($originalImagePath)
->resize($size)
->toFile($newFileName, \mime_content_type($originalImagePath));
->toFile($newFileName, $imageInfo['mime']);
}
}
}

0 comments on commit bdbb38a

Please # to comment.