title: Is there a way to get an url out of a chrome's storage image?
body: <p>I'm building a <strong>Chrome App</strong> and I get from a XMLHTTPREQUEST a .png file that later is stored localy using the chrome.storage API so I can use it later in case that the person who is going to use the App can acces to it without a connection to internet. The problem is that in html you always need a url that specifies where the image is stored and I have tried everything to get an url out of that .png file stored in the chrome storage but nothing works.</p>
  
  <p>I'm asking for a way to get from that stored image an url to use in an html img.</p>
  
  <p>This is the code in which I get the .png file and store it in chrome's storage.</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open('GET', 'http://siteurl.com/image.png', true);
  xhr.responseType = 'image/png';
  xhr.onload = function(e) {
      chrome.storage.local.set({'iconImage':this.response}, function() {
          console.log('Image Saved');
      });
  };
  xhr.send();
  </code></pre>
  
  <p>And this is the code that gets the image out of the storage.</p>
  
  <pre><code>chrome.storage.local.get(function(image){
      var img = image.iconImage;
  
      //here is where I need to create the url so I can use it to 
        display the image in a &lt;img&gt;
  });
  </code></pre>
  
  <p>Thank you and sorry for my english if it is not understandable.</p>