The easiest way to create an image link is to use a shortcode from the oik plugin.
You can create a text link using the [bw_link] shortcode. e.g. [bw_link 402]
e.g. [bw_thumbs id=402]
The image that is displayed is the featured image for the post, or if there is no featured image it’s randomly selected from the images attached to the post.