resize images, so that an exact number of images fit into the window; images are still jolted horizontally at certain window widths