title: jQuery width() and height() return 0 for img element
body: <p>So I am creating a new image element once I get response from AJAX call with image metadata like this:</p>
  
  <pre><code>var loadedImageContainter = $('&lt;div class="loaded-image-container"&gt;&lt;/div&gt;');
  var image = $('&lt;img src="' + file.url + '" alt=""&gt;');
  loadedImageContainter.append(image);
  $('.loading-image').replaceWith(loadedImageContainter);
  var width = image.width();
  var height = image.height();
  console.log(width);
  console.log(height);
  </code></pre>
  
  <p>But width() and height() functions are returning 0 although image has 30 x 30 px size and it appears correctly on the page. I need to get its dimensions in order to absolutely position the image.</p>