Forum Discussion

Claudius's avatar
13 years ago

How to reference images? image base path?

Currently hacking together a custom component referencing some of the stock images. I'm currently referencing them with the relative path including the versioning path component: <img class="Article...
  • MoniqueL's avatar
    MoniqueL
    13 years ago

    Ah, my bad, I missunderstood. The format I posted eariler is what you use to refrence images in the skin.css file. For your component, the image path should look something like this.

     

    <img src="${("skin.images.icon_tkb_thread.url")}" />

    As for your follow up, as long as you're using our core images, this "skin.images.<file name minus file type>.url" path should work, regardless of it being a mobile or desktop image (I believe all the file names for each view are unique). If an image for both instances shares the same name, then I would suggest saving the image, giving it a unique name, and adding it to the skin as 'Other assets' and then you can refrencing each one. Although the path now changes to " /html/assets/<filename>"