This commit is contained in:
Barış Soner Uşaklı
2018-06-12 16:05:17 -04:00
parent 7d34fa5a3a
commit e7cd552e33

View File

@@ -323,7 +323,7 @@ function addOGImageTagsForPosts(res, posts) {
function addOGImageTag(res, imageUrl) {
if (typeof imageUrl === 'string' && !imageUrl.startsWith('http')) {
imageUrl = nconf.get('url') + imageUrl;
imageUrl = nconf.get('url') + imageUrl.replace(new RegExp('^' + nconf.get('relative_path')), '');
}
res.locals.metaTags.push({
property: 'og:image',