Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Shafeeq 17 posts 87 karma points
    Oct 22, 2013 @ 09:59
     Shafeeq
    0

    Images are not displaying in template..

    Dear guys,

    I have a static html template..When I convert to Umbraco images are not displaying..I had created two websites in same way,it is working properly..I have copied my image folder to Umbraco folder as I did before..I dont need umbraco field for this image...Just for a header baner by using this simple html code:

    <img src="images/baner.jpg"/>

    Can you help me..

    Thank you.

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Oct 22, 2013 @ 10:26
    Dennis Aaen
    0

    Hi Shafeeq,

    If you don´t want Umbraco to handle the image by using some XSLT, Razor, or the new umbraco:Image control there was introduced from Umbraco 4.11 I will suggest you to make a folder in the root of the site, and name this folder e.g frontend or something else. In this folder you can store images like the banner image.

    When you have to reference the image in the tempalte it can be done like this e.g.

    <img src="/frontend/baner.jpg"/>

    But if you want to store the banner image in Umbraco´s media library it can be done. When you have uploaded the image to the library. Click on it, and choose the properties tab for the image. There you will get the file path to image. An example of a file parh could be /media/1002/banner.JPG:

    So in you template you can reference the image:

    <img src="/media/1002/banner.jpg" />

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft