support image and prettyprint.