Skip to content

Commit 0595e53

Browse files
committed
B2B-2067: Gallery Image is not saving the remote storage file on to local
- Added fix for the test on Gallery class
1 parent be9b1fe commit 0595e53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Catalog/Block/Product/Gallery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ public function getImageFile()
122122
public function getImageWidth()
123123
{
124124
$file = $this->getCurrentImage()->getPath();
125-
125+
$fileStat = $this->getMediaDirectory()->stat($file);
126126
if ($this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->isFile($file)) {
127-
$size = getimagesize($file);
127+
$size = $fileStat['size'];
128128
if (isset($size[0])) {
129129
if ($size[0] > 600) {
130130
return 600;

0 commit comments

Comments
 (0)