title: Set content-type on blob
body: <p>We're transferring a <code>Blob</code> (image) down a websocket and rendering it to a canvas on the other end.</p>
  
  <p>When I use <code>createObjectURL</code> with the blob, I get this warning:</p>
  
  <pre><code>Resource interpreted as Image but transferred with MIME type text/plain: "blob:https%3A//example.com/demo".
  </code></pre>
  
  <p>We create the object URL using the following code. The blob is send via a standard websocket with <code>socket.binaryType = "blob";</code> on the client side:</p>
  
  <pre><code>socket.onmessage = function(e) {
    var blob = e.data;
    var url = (window.URL || window.webkitURL).createObjectURL(blob);
  
    var image = document.createElement('img');
    image.src = url;
  }
  </code></pre>
  
  <p>The only way I can think to address this warning is to create a copy of the blob with the following code, but I don't want to introduce the overhead of copying all the data:</p>
  
  <pre><code>var blob = new Blob([e.data], {
    type: 'image/gif'
  });
  </code></pre>
  
  <p>The method gets called dozens of times per second.</p>
  
  <p>Any ideas on how to set the blob content-type without creating a duplicate <code>Blob</code> object with <code>new Blob</code>?</p>