add postImgUrl support and clean code