 <p>Concatenate string properly:</p> <p>Replace this:</p> <pre><code>var newImage = "&lt;img src='https://api.twilio.com" + data + "/&gt;"; // you're missing to close quote for src here ^^ </code></pre> <p>With this:</p> <pre><code>var newImage = "&lt;img src='https://api.twilio.com" + data + "' /&gt;"; </code></pre> <p>Or switch the quotes:</p> <pre><code>var newImage = '&lt;img src="https://api.twilio.com' + data + '" /&gt;'; </code></pre>