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
The gallery itself is pretty basic, it asks for a directory and it will then display all the images and videos in that directory.
Here is simple solution, how to get size of all images on webpage, so if you have something like simple photo-gallery, what getting images from folder and you haven't got any list of this images, this is the simplest solution how to get size of that and then you can process in how you want.
for( i=0; i < document.images.length; i++)
{
width = document.images[i].width;
height = document.images[i].height;
console.log("Image number: " + i + " Size: " + width + "x" + height);
}
Get image size example