Я включил ответ pimvdb в функцию общего назначения в моем проекте:
function checkImageSize(image, minW, minH, maxW, maxH, cbOK, cbKO){
//check whether browser fully supports all File API
if (window.File && window.FileReader && window.FileList && window.Blob) {
var fr = new FileReader;
fr.onload = function() { // file is loaded
var img = new Image;
img.onload = function() { // image is loaded; sizes are available
if(img.width < minW || img.height < minH || img.width > maxW || img.height > maxH){
cbKO();
}else{
cbOK();
}
};
img.src = fr.result; // is the data URL because called with readAsDataURL
};
fr.readAsDataURL(image.files[0]);
}else{
alert("Please upgrade your browser, because your current browser lacks some new features we need!");
}
}