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
Could something like this help?
var imgs = document.getElementsByClassName("imgs");
var height = imgs.clientHeight;
var width = imgs.clientWidth;
imgs.sort(function(a, b){
return a.height - b.width;
});
or using node.js:
imgs.sort(function(a, b) {
return fs.statSync(a).size - fs.statSync(b).size;
});