optimize the image architecture