I made this gallery a while ago: https://jsfiddle.net/5e9L09Ly/
Don\'t worry it won\'t upload anything.
I made that you can sort by file size, but I want to
you can get the image size using this an after you sort as per your requirement
this is my example : how to get image size before load https://jsfiddle.net/mmghori/Lsnc0sr7/
and
here is you updated fiddle https://jsfiddle.net/mmghori/ubgLv3cb/ , in this fiddle i add my code and console image size,
so i just find how to get image size before load.
var _URL = window.URL || window.webkitURL;
$("#file").change(function(e) {
var file, img;
if ((file = this.files[0])) {
img = new Image();
img.onload = function() {
$("#fileSize").text(this.width + "x" + this.height);
};
img.onerror = function() {
alert( "not a valid file: " + file.type);
};
img.src = _URL.createObjectURL(file);
}
});