Hello,
Use the graphics editor (Photoshop or any other you prefer) and make all the images in one size. Edit images before uploading them to your Media Gallery to get the nice and aligned grid.
Regards