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 29fe909 commit ce05b97Copy full SHA for ce05b97
app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -722,7 +722,14 @@ public function resizeFile($source, $keepRatio = true)
722
$image->keepAspectRatio($keepRatio);
723
724
[$imageWidth, $imageHeight] = $this->getResizedParams($source);
725
-
+ try {
726
+ $image->resize($imageWidth, $imageHeight);
727
+ }
728
+ catch (\Throwable $e)
729
+ {
730
+ $this->logger->critical( 'FAILED WYSIWYG IMAGE RESIZING: ' . ' error: ' . $e->getMessage() . '. path: ' . $realPath );
731
+ return false;
732
733
$image->resize($imageWidth, $imageHeight);
734
$dest = $targetDir . '/' . $this->ioFile->getPathInfo($source)['basename'];
735
$image->save($dest);
0 commit comments