We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 95c5c4a + 8a7d851 commit 8ca2748Copy full SHA for 8ca2748
app/code/Magento/Swatches/Helper/Media.php
@@ -109,7 +109,11 @@ public function getSwatchAttributeImage($swatchType, $file)
109
$absoluteImagePath = $this->mediaDirectory
110
->getAbsolutePath($this->getSwatchMediaPath() . '/' . $generationPath);
111
if (!file_exists($absoluteImagePath)) {
112
- $this->generateSwatchVariations($file);
+ try {
113
+ $this->generateSwatchVariations($file);
114
+ } catch (\Exception $e) {
115
+ return '';
116
+ }
117
}
118
return $this->getSwatchMediaUrl() . '/' . $generationPath;
119
0 commit comments