Skip to content

Commit 090cbe8

Browse files
committed
Merge branch 'B2B-2022' of github.com:magento-arcticfoxes/magento2ce into B2B-2022
2 parents 5313c8e + 98b60d4 commit 090cbe8

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)