So I have downloaded, installed and used the Contrib ImageFeild Modue within a custom content type. All works well except for when I try to resolve the image url in my content type view.
For example, in my debugging of the custom view template I assign a variable to the FileName property of my content type which has the value "~/media/default/bio/biophoto/myimage.jpg", this is exactly what I want to render but what does render
is this http://mysite/~/media/default/bio/biophoto/myimage.jpg what am I missing here. I did allow the module to do a default install so I was assuming it would path correctly. Also running
orchard.web as a virtual under local IIS but it is not the default site. Am I missing something here? I could strip the "http://mysite" out but that doesnt seem to me to be the correct way to handle this. Am I configured
incorrectly or other. Any help is appreciated.
(~/themes/mytheme/views/items/content-bio.cshtml) - the view template
string biophoto = Model.ContentItem.Bio.BioPhoto.FileName;
var photo = new HtmlString(biophoto);
<div class="myclass" style="display:block; width:122px; padding-left:3px; padding-bottom:25px;">
<img src="@photo" alt="" />