Skip to content

Commit 8964244

Browse files
authored
Merge pull request #21 from landofcoder/fix-gallery-image-url
updated block
2 parents dd0cdae + b2fdebd commit 8964244

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Block/Product/View/ListView.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,16 @@ public function getReviewsGallery($reviewId)
206206
}
207207

208208
/**
209-
* @param $image
209+
* @param string $image
210210
* @return string
211211
* @throws \Magento\Framework\Exception\NoSuchEntityException
212212
*/
213213
public function getMediaUrl($image)
214214
{
215+
$parsed = parse_url($image);
216+
if (!empty($parsed['scheme'])) {
217+
return $image;
218+
}
215219
$mediaUrl = $this->_storeManager
216220
->getStore()
217221
->getBaseUrl(UrlInterface::URL_TYPE_MEDIA) . 'lof/product_reviews/' . ltrim($image, '/');

0 commit comments

Comments
 (0)