0

I'm uploading an image using file input control. I would like to validate the height-width of it before upload. Is there any way to do it using JQuery? How?

s.k.paul
  • 7,099
  • 28
  • 93
  • 168

1 Answers1

0

you can use this get the image id and use this function:

var img = document.getElementById('imageid'); 
//or however you get a handle to the IMG
var width = img.clientWidth;
var height = img.clientHeight;

your question is same as this: How to get image size (height & width) using JavaScript?

Community
  • 1
  • 1
Rickey
  • 71
  • 2
  • 14