I used the Masonry (with first wide) layout, and my categories images have the exact same sizes as the ones used in the demo. (540×540 for the square images, and 379×800 for the vertical image).
But it seems like it automatically crops the vertical image. (See screenshot attached)