Preserving order of the images is now optional