Search code examples
moovweb

Moovweb: specify assets in images/folder via html?


I know that its possible to reference the contents of your images folder using tritium. I am however using the read() function to bring in an html snippet. Is there a way to specify images via that html snippet? eg:

<img src='/moovweb_local_assets_/images/Logo150.png">' alt="1" /> 

Solution

  • I dont know about this but i can give you some trick. Add any class or id to this img tag and add the src attribute and its url with the help of tritium. eg.,

    html:

    <img id="myImage" alt="1" /> 
    

    tritium:

    $$("#myImage"){
       attribute('src',asset('images/Logo150.png'));
    }