diff --git a/apps/web/scripts/pullLatestBlogPosts.js b/apps/web/scripts/pullLatestBlogPosts.js index 9a489ef04e3..400e64ef120 100644 --- a/apps/web/scripts/pullLatestBlogPosts.js +++ b/apps/web/scripts/pullLatestBlogPosts.js @@ -163,7 +163,7 @@ async function main() { const publicImagePath = path.join('public', 'images', 'blog', fileName); await downloadImage(post.imageUrl, publicImagePath); - post.publicImagePath = publicImagePath.replace('public', ''); + post.publicImagePath = '/' + path.relative('public', publicImagePath); } // Save the results as JSON