Flask changing image source dynamically

I don't get why changing src of img tag doesn't work for me

<script></script>
path = 'img/8.png'
link = '{{ url_for("static", filename="' + path +'") }}';
$(".home").attr('src', link);
console.log(link);
console.log(decodeURI(link));



output : /static/%27%20+%20path%20+%27
output : /static/' + path +'

Happy Wheels apk online.

Started by despiteactivator at May 12, 2019 - 11:57 PM