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?
Asked
Active
Viewed 3,073 times
1 Answers
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?