From e7cd552e3399e9a782c081b88b942b184a544da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 12 Jun 2018 16:05:17 -0400 Subject: [PATCH] closes #6568 --- src/controllers/topics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/topics.js b/src/controllers/topics.js index b6ff617c15..e1796c13f9 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -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',