added logic to delete an image from a post in edit form