How to get image size (height & width) using JavaScript? How to get image size (height & width) using JavaScript? javascript javascript

How to get image size (height & width) using JavaScript?


You can programmatically get the image and check the dimensions using Javascript...

const img = new Image();img.onload = function() {  alert(this.width + 'x' + this.height);}img.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';