Model/Product/Image.php
public function getResizedImageInfo()
    {
        if ($this->isFastlyImageOptimizationEnabled() == false) {
            return parent::getResizedImageInfo();
        }

        // Return image data
        if ($this->getBaseFile() !== null) {
            return [
                0 => $this->getWidth(),
                1 => $this->getHeight()
            ];
        }

        // No image, parse the placeholder
        $asset = $this->_assetRepo->createAsset(
            "Magento_Catalog::images/product/placeholder/{$this->getDestinationSubdir()}.jpg"
        );
        $img = $asset->getSourceFile();
        $imageInfo = getimagesize($img);

        $this->setWidth($imageInfo[0]);
        $this->setHeight($imageInfo[1]);

        return $imageInfo;
    }
public function getResizedImageInfo()
    {
        if ($this->isFastlyImageOptimizationEnabled() == false) {
            return parent::getResizedImageInfo();
        }

        // Return image data
        if ($this->getBaseFile() !== null) {
            return [
                0 => $this->getWidth(),
                1 => $this->getHeight()
            ];
        }

        // No image, parse the placeholder
        $asset = $this->_assetRepo->createAsset(
            "Magento_Catalog::images/product/placeholder/{$this->getDestinationSubdir()}.jpg"
        );
        $img = $asset->getSourceFile();
        $imageInfo = getimagesize($img);

        $this->setWidth($imageInfo[0]);
        $this->setHeight($imageInfo[1]);

        return $imageInfo;
    }
public function getResizedImageInfo ( ) { if ( $ this -> isFastlyImageOptimizationEnabled ( ) == false ) { return parent :: getResizedImageInfo ( ) ; } // Return image data if ( $ this -> getBaseFile ( ) !== null ) { return [ 0 => $ this -> getWidth ( ) , 1 => $ this -> getHeight ( ) ] ; } // No image, parse the placeholder $ asset = $ this -> _assetRepo -> createAsset ( "Magento_Catalog::images/product/placeholder/{$this->getDestinationSubdir()}.jpg" ) ; $ img = $ asset -> getSourceFile ( ) ; $ imageInfo = getimagesize ( $ img ) ; $ this -> setWidth ( $ imageInfo [ 0 ] ) ; $ this -> setHeight ( $ imageInfo [ 1 ] ) ; return $ imageInfo ; }
Return resized product image information

@return array
Return resized product image information