There isn't any setting for default dimensions but server admins can set the file upload size limit, that will be what determines how large an image you can try to upload (if it's extremely large the server might still time out before it finishes uploading). Server admins can also change how Friendica stores uploaded images. The default is to store them in the database, but that can quickly make the database grow, so there are other options. However, none of this is in the hands of the user.
You can also place external images in your posts, assuming the site you're pulling them from allows hotlinking. Friendica will try to generate a local preview image for it (though I've personally found this very hit-or-miss).
The masonry layout works with images that have different aspect ratios. The aspect ratios and the order you put them in your post have more to do with the layout than anything else. If they're all the same size and aspect ratio they'll likely layout in a grid naturally.
As for the actual "grid" layout in Friendica, we're still trying to determine if it ever actually gets used. It's only used if Friendica can't get the image dimensions, but it's unclear if/when that ever happens.