Verify that the site.url has a protocol.
parse post.content and add the necessary protocol to images url
refactored code for clarity
Resolve conflicts
corrected the out of loop post.content
finally if statements works correctly
Fix typo