I think you have pressed 'Enter/Return' between some images, spaces are showing between them only. If you want to remove the spaces, remove the space between the images caused due to pressing of 'Enter/Return' or if you want to add spaces between the remaining photos, press 'Enter/Return'. I hope this helps.
~~MZ~~