title: JavaScript serialize image (icon)
body: <p>I am building an extension in CrossRider. I need to save images/icons, which I have their url, in a database. They are tiny images and won't be a problem in the database. I might have something like that accessible to <code>background.js</code>:</p>
  
  <pre><code>&lt;img src="http://something.com/icon.ico" alt="icon"&gt;
  </code></pre>
  
  <p>And I want to be able to serialize that image to the database (it's a key/value database) and deserialize that later and display it. Something like HTML5's <code>FileReader.readAsDataUrl()</code> will be good, but I can't use that method because it seems too tied to forms.</p>
  
  <p>Thanks ([-|).</p>