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.
2 parents 5313c8e + 98b60d4 commit 090cbe8Copy full SHA for 090cbe8
app/code/Magento/Catalog/Block/Product/Gallery.php
@@ -122,9 +122,9 @@ public function getImageFile()
122
public function getImageWidth()
123
{
124
$file = $this->getCurrentImage()->getPath();
125
-
+ $fileStat = $this->getMediaDirectory()->stat($file);
126
if ($this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->isFile($file)) {
127
- $size = getimagesize($file);
+ $size = $fileStat['size'];
128
if (isset($size[0])) {
129
if ($size[0] > 600) {
130
return 600;
0 commit comments