Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get img dimensions from remote url js

function getMeta(url, callback) {
    var img = new Image();
    img.src = url;
    img.onload = function() { callback(this.width, this.height); }
}
getMeta(
  "http://snook.ca/files/mootools_83_snookca.png",
  function(width, height) { alert(width + 'px ' + height + 'px') }
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #img #dimensions #remote #url #js
ADD COMMENT
Topic
Name
3+1 =