I am storing the location of images in my database in an MVC application...but i am only storing part of the location. For example:
/headers/image1.jpg /head
Just do it!
UPDATE:
As of ASP.NET MVC 4 it is valid to use the tilde URLs directly in HTML as the Razor View Engine will parse the URLs. Like this: