Get Image Dimensions
const upload = document.querySelector('#Image');
upload.addEventListener('change', _ => {
if(upload.files.length) {
const img = new Image();
var blob = URL.createObjectURL(upload.files[0]);
img.onload = () => {
console.log(`width:${img.width}, height: ${img.height}`);
URL.revokeObjectURL(blob);
}
img.src = blob;
}
})