Take layout empty columns into consideration

Hello,
I’m using the layout field to create different compositions of image.
I would like to use a layout of 1/2, 1/2 and consider if a column is empty.

To put this in context, I would like to contemplate a situation where one column has an image and the other column is empty, and instead of ignoring the last one, take it into consideration by perhaps create a ‘div’ that generated an empty gap. This way I can create more complex layouts for the images without needed to add extra/unnecessary fields.

Is that something that can be achieved?

Thank you in advance

Yes, you can use an if statement to check if a column is empty in the standard loop:

Standard loop: Layout | Kirby CMS

Column methods: LayoutColumn | Kirby CMS

Thanks again!