public static string GetImageFullUrl(string imageUrl)
{
/// Examples of some fully qualified URLs:
/// http://somehost.com/Subtext.Web/images/somehost_com/Subtext_Web/blog/8/pic.jpg
/// http://thathost.net/Subtext.Web/images/thathost_net/Subtext_Web/4/picture.jpg
/// http://fooHost.org/images/fooHost_org/myBlog/2/bar.jpg
/// http://barHost.edu/images/
///
/// Examples of some local URLs:
/// /Subtext.Web/images/somehost_com/Subtext_Web/blog/8/pic.jpg
/// /Subtext.Web/images/thathost_net/Subtext_Web/4/picture.jpg
/// /images/fooHost_org/myBlog/2/bar.jpg
/// /images/barHost_edu/7/that.jpg
// First see if already have a full url
if(!imageUrl.StartsWith("http"))
{
// it's not a full url, so it must by some type of local url
// so add the siteRoot in front of it.
imageUrl = StripSurroundingSlashes(imageUrl);
imageUrl = string.Format("http://{0}/{1}", Config.CurrentBlog.Host, imageUrl) ;
}
return imageUrl ;
}