Skip to content

Commit

Permalink
Pass correct media url without store code
Browse files Browse the repository at this point in the history
for default og:image that is set in backend

Tickets: MASE2OT-117
  • Loading branch information
Quinten Clause committed Dec 13, 2018
1 parent ca2360a commit 9e8f574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Block/Opengraph/General.php
Expand Up @@ -116,7 +116,7 @@ public function getOgImageUrl()
$url = $this->getViewFileUrl('Magento_Theme::images/facebook-og-preview.jpg');
$configOgImage = $this->_scopeConfig->getValue('socialmediachannels/facebookchannel/facebookogimage', $this->_scope);
if (!empty($configOgImage)) {
$url = $this->getUrl('pub/media/socialmedia').$configOgImage;
$url = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . 'socialmedia/'.$configOgImage;
}
return $url;
}
Expand Down

0 comments on commit 9e8f574

Please sign in to comment.