Question

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" /> 
Était-ce utile?

La 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'));
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top