refactors images out of posts