I need to display the image size in kilobyte and the dimension (height, width) using javascript/jquery. I came across few similar posts, but none could help me. I have two set o
How to get image width and height using jquery
Find out the image width and height during image upload using jQuery
Size and dimension of upload image file
var _URL = window.URL || window.webkitURL;
$("#myfile").change(function (e) {
var file, img;
if ((file = this.files[0])) {
img = new Image();
img.onload = function () {
var wid = this.width;
var ht = this.height;
alert(this.width + " " + this.height);
alert(wid);
alert(ht);
};
img.src = _URL.createObjectURL(file);
}
});