Answers for "get width of html photo"

0

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;
Posted by: Guest on January-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language