My best guess in this regard is that outlook editor (basically, an HTML editor), looks for each phrase (well, lets define a phrase as a string of characters which is followed by a space) and tries to match it with a regular-expression. In this case, it probably watches for a pattern like http://<chars>.<chars> or www.<chars>.<chars>
Once it finds such a pattern, lets say http://google.com
, it edits the background html to be <a href="http://google.com">http://google.com</a>.
In your case, you can do the same thing by "looking through" the text being typed and replacing the keywords of interest and replacing them by a reference to the image file. For example, watching out for any appearance for a word like "sea" or "ocean", and replacing the word by a link to a picture from Hawaii :).
This editor of p2p.wrox.com would have done the same to some of the phrases in my reply.