This project is read-only.

Images will not display

Topics: Themes
Sep 6, 2010 at 5:56 PM
Edited Sep 6, 2010 at 6:04 PM

I am trying to convert a css theme to BE and cannot get any images to display.

I have tried this in the site/master without success:

 <img src="/BlogEngine.NET/themes/terrafirma2/images/img02.jpg"

and also this:

<img src="<%= Utils.RelativeWebRoot %>/images/img01.jpg"

and also this:

<div id="banner">        <a href="<%=Utils.AbsoluteWebRoot%>">        <img src="~/themes/terrafirma2/images/img01.jpg" width="667" height="118" alt="" /></div>


The style.css has all images as:


I have not had this issue with other themes converting attempts.

Thank you.




Sep 6, 2010 at 7:40 PM

That should work fine:

<img runat="server" src="~/themes/terrafirma2/images/img01.jpg" width="667" height="118" alt="" />

Sep 7, 2010 at 12:07 PM

Thank you, I am finding the css stuff difficult, looking forward to your completion of Boldy.

Sep 9, 2010 at 1:10 PM

This will work but it means you have embedded the folder name into your master page.

I would prefer to use this technique:

<img src='<%= ResolveUrl("images/example.jpg") %>' alt="" />


This is a feature built into .net:

Sep 9, 2010 at 5:19 PM

Thank you very much, this works great!