title: Loading template images in requireJS module
body: <p>I'm using the text plugin with requireJS in order to load some html into the page. 
  I've defined a modules that is responsible for this: </p>
  
  <pre><code>define(['jquery', 'text!/path/to/template/template_name.html'], function($, rciTpl){
  </code></pre>
  
  <p>Inside the module I have a method that, after receiving data from an ajax call ads items to the DOM: </p>
  
  <pre><code>var buffer = $.map(data, function(d, i){
              //clone the template;
              var tpl = template.clone();
  
              //set the url
              tpl.find('a.lt, a.la').attr('href', d.url);
  
              //set the title
              tpl.find('a.lt').text(d.title);
  
              //return the raw node
              return(tpl.get());
          });
  
  $('#myContainer').append(buffer);
  </code></pre>
  
  <p>Everything works ok so far. Problem appears when I want to add an image dynamically to my template. Something like this: </p>
  
  <pre><code>tpl.find('img').attr('src', 'item_img_path.svg');
  </code></pre>
  
  <p>The error that I get in the browser's console is: "Resource interpreted as Image but transferred with MIME type text/html", which makes sense, but I don't know how to get passed it. </p>
  
  <hr>
  
  <p>I am also opened to different approaches in achieving my task. </p>
  
  <p>Thanks. </p>