Changing Image in Repeater based on file type

I have a task to pull the last N documents that the logged in user has shared with other users. I am bringing back this dataset with a sql query and using a repeater control. In addition to listing the documents the Business wants to show an icon for each type of document. For example if the document is a pdf then they want the pdf icon, and so on. I don't know if this can be done with an ASCX transformation, so I have opted to write a custom function where I would pass the Documenttype (pdf, docx, etc) and let it return the filename like so "~\Images\pdf.jpg"

Is there anyway I can return the image filename to the GetImage function.

I have tried it that way and still getting nothing. Is there some setting somewhere where it looks for images. Otherwise, how does it know where my image is stored? Am I able to set where it looks for icons?