Skip to content

Commit 103c28b

Browse files
committed
Fixes issue with non existing file, when adding image to gallery with move option. Fix for #21978
1 parent 77297a1 commit 103c28b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/Product/Gallery/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function addImage(
196196
$mediaGalleryData = $product->getData($attrCode);
197197
$position = 0;
198198

199-
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($file);
199+
$absoluteFilePath = $this->mediaDirectory->getAbsolutePath($destinationFile);
200200
$imageMimeType = $this->mime->getMimeType($absoluteFilePath);
201201
$imageContent = $this->mediaDirectory->readFile($absoluteFilePath);
202202
$imageBase64 = base64_encode($imageContent);

0 commit comments

Comments
 (0)