In the gallery settings page, scroll down to the Design section, click Grid, then save the change.
In this layout, user cannot change the dimension of image arbitrarily. There are some samples of dimension that user has to follow: width 1, width 2, width 3; and height 1, height 2, height 3.
You can change it after click on each image.
Or you can change it in the Gallery Preview section.
Hover on an image and the arrows will appear at the top right corner of the image. Then you can click the arrows to change the height, width of the image in the grid layout.