Aquí está la imagen que me gustaría usar (ruta HTML - "Marlene.jpg"):
<div class="startpanel panel transition current"> <div class="image" style="background:url('../../Doggo-particular/dist/pictures/Marlene/Marlene.jpg') 50% 50%; background-size:cover;"> </div>Este es el código javascript donde necesito poner la imagen:
var possible_results = [ { name: "Marlene", //THE ANIMALS CHARACTERISTICS BY WHICH ITS MEASURED: colourfulness: 10, hairiness: 10, landiness: 55, size: 80, carnivore: 0, scariness: 40, sociability: 70, //THE SCORE IT GETS COMPARED TO THE QUIZ TAKER: similarity: 0, //BITS FOR THE RESULTS PANEL: desc: "Bold, beautiful and brilliant - your best match is Marlene!<br> You're intelligent and powerful. Your friends love you and whilst no-one wants to mess with you, everyone agrees - you are great! <br> In the wild there are only 600,000 African elephants and it is officially classed as vulnerable.", img: "../../Doggo-particular/dist/pictures/Marlene/Marlene.png",He usado este sitio web como un tutorial:
https://moonbooks.org/Articles/How-to-add-an-image-in-a-HTML-page-using-javascript-/
La ruta en "img:" no funciona y la referencia del código del sitio web me da errores. ¿Puede alguien ayudarme sobre cómo mostrar la imagen? No me importaría colocar la imagen en la misma carpeta y luego llamarla, también probé este método y no funcionó.