Attache image to a form

You can use imageOutput() and renderImage() as shown in this post.