diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb index accdc40..efa06c3 100644 --- a/app/helpers/blog_posts_helper.rb +++ b/app/helpers/blog_posts_helper.rb @@ -1,6 +1,6 @@ module BlogPostsHelper def extract_first_image_path(post) - caption, image_path = post.body.match(/\[([^\[\]]+)\]\(([^)]+)/).try(:captures) + caption, image_path = post.body.match(/\[([^\[\]]+)\]\((\/images\/[^)]+)/).try(:captures) if image_path.present? URI.join(request.base_url, image_path)