saving images as attachment and making them postimage revised
get images from entities simplified