Media is retrieved using for instance MediaReference. But is there some way of retrieving a media from the URL that is used to access it? By URL I mean the value of the URL-property in the Media class, for instance server//imagevault/publishedmedia/something/something.jpg
Yes, you can use the IMediaService.Find method
This method takes an MediaItemFilter as parameter and it's Filter property is a MediaItemFilter instance
that has a Url property. Set this to the Url of the image and it will filter out the item that the url belongs to.