Src file path with php (wordpress) in a javascript file
<p>For some reason the normal src path of my template made with wordpress doesn't work. It is embedded in a javascript connect to my footer.php. Now my question is: is it possible to call an image with src inside a javascript with a php snippet?
Here is my code so far:</p>

<pre><code>var d = new Date();

document.getElementById("copyright").innerHTML = "&amp;copy;" + " " + (d.getFullYear()) + " " + "All Rights Reserved" + " " + " " +"&lt;img src='wp-content/themes/wpboot/images/maple.svg' alt='Canadian maple leaf' width='14'&gt;" + " " + "We Are A Canadian Company";
</code></pre>

<p>I'm trying to add a php snippet like that:</p>

<pre><code>&lt;img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/maple.svg" width="60" alt="Maple"&gt;
</code></pre>

<p>To achieve something like that:</p>

<pre><code>document.getElementById("copyright").innerHTML = "&amp;copy;" + " " + (d.getFullYear()) + " " + "All Rights Reserved" + " " + " " +"&lt;img src='&lt;?php bloginfo('template_directory'); ?&gt;/images/maple.svg' alt='Canadian maple leaf' width='14'&gt;" + " " + "We Are A Canadian Company";
</code></pre>

<p>I tried to build a var called:</p>

<pre><code>var template = "&lt;?php bloginfo('template_directory'); ?&gt;/";
</code></pre>

<p>And I added to the src but I didn't work.. any clue?</p>