White spaces shows because images are different proportions.
The easiest way to fix that would be to crop all images to squares (with width and height dividable at least by 2, better by 8).
Then the biggest image should have width and height 3x longer than smallest one, middle one should be 2x bigger than smallest, and smallest - should be the point of orientation.
If you prepare images this way the grid should look fine.