Example:
Thread url: http://www.chiefdelphi.com/media/photos/39142
Image url: http://www.chiefdelphi.com/media/img/774/774d98c80dcf656f2431b2e9186f161a_l.jpg

So yes, the thread url is the media_id (or foregin_key if you wish) in a template. Image url seems pretty arbitrary.