JSFiddle - React, Tailwind, and code Playground

HTML

<div id="print" style"background-color: yellow;">
asdfasdfasdf
</div>

JavaScript

function getMeta(url){
	var r = $.Deferred();

  $('<img/>').attr('src', url).load(function(){
     var s = {w:this.width, h:this.height};
  	 r.resolve(s)
  });
  return r;
}



getMeta("http://www.google.hr/images/srpr/logo3w.png").done(function(test){
	test
	$('#print').html(test.w + ' ' + test.h);
});