Heyo!
I've been trying to add an image using jQuery to a <div>, using the {% static %} way of doing it.
$("myDiv").append(`<img src="{% static "images/card.png" %}"/>`);
When doing it this way, the src of the image becomes the literal string "{% static "images/card.png" %}", and no image is showed on the page.
Is it possible to add the image to the page this way?
If I add the <img> tag directly with the src in the HTML, the image does show up!
I've tried using double quotes, single quotes, literals, saving the path to a variable and so on, however without luck.
Could use a tip on how to make this work, if possible!
Cheers,
Fred