use js for data, no server required, wait all images to be loaded to do rescale
sort images by filename
now image can be loaded first