diff --git a/core/server/controllers/frontend.js b/core/server/controllers/frontend.js index 0ca6ac78fd..54f9a61bf8 100644 --- a/core/server/controllers/frontend.js +++ b/core/server/controllers/frontend.js @@ -510,6 +510,11 @@ frontendControllers = { }, htmlContent = cheerio.load(post.html, {decodeEntities: false}); + if (post.image) { + htmlContent('p').first().before(''); + htmlContent('img').attr('alt', post.title); + } + // convert relative resource urls to absolute ['href', 'src'].forEach(function (attributeName) { htmlContent('[' + attributeName + ']').each(function (ix, el) {