title: How to make a background of unknown size to an HTML5 canvas?
body: <p>I want users to upload an image or specify a URL of an image and then be able to look like they're drawing on top of the image. So I can make a <code>&lt;canvas&gt;</code> element with a background image. But I don't know beforehand how big that image is (well I can figure it out if they uploaded an image). How can I deal with this using jQuery?</p>
  
  <p>I know I can call <code>$('img#id_name').width</code> and create a canvas based on that width (and get the height the same way). But I want that to be the background image.</p>