Pregunta

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" /> 
¿Fue útil?

Solución

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'));
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top