Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get width of html photo

var img = new Image();

img.onload = function(){
  var height = img.height;
  var width = img.width;

  // code here to use the dimensions
}

img.src = url;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #width #html #photo
ADD COMMENT
Topic
Name
8+2 =