Bricks Image Gallery widget content force to specific height regardless of number of images

Hi there. Imagine two blocks. So Section-Container-Block-Block

The Contianer is set to Dsiplay:Grid (repeat(2, minmax(0, 1fr)))

So two Blocks are nicely placed left to right.

Left block - I set it minimum height and maximum height to 600
Right block - I place Image Gallery, which pulls images from CPT image gallery (Metabox).

My problem is this: Some CPTs have 4 images, and some have 7-10 images (not more than 10).

I would like to achieve proportional “fill,” so to speak (in the lack of finding a better term).

Bascially left block is a max height of 600, and the right block is also set to the max height of 600, but sometimes CPT gallery has 10 images, and then even though I set it to 600, images spawn below, and the whole area that contains images is much larger in height, it goes above 600 px. Overflow:hidden doesn’t work as it cuts images that go above 600px.

I can play with Image Gallery image sizes, and for example, I could “fit” those 10 images within 600px, but then on the other CPTs where there are 4 images - those look super tiny.

What are my options, and where do I look? How to achieve Image Gallery widget populating and fitting space of 600px (width 100% of the block) with images from the gallery regardless of how many images are there (granted many images would look absurd in such height but I have max 10 images per gallery).

So 4 images - perfect fit within 600px height
or 10 images also perfectly fit inside 600px height
or 7 images - same effect

Could you send link to the website with this element?

First solution that comes to my mind (even probably not the best) is to wrap images into some divs with position relative, while image will have position absolute, width 100% and height 100%. Or just div and image as a background. And set grid-row. Divs are easier to work with in terms of stretching, I think there is better way, but I would have to play with CSS, so send the link if you want