Meta Box Image Advanced Field Images in Bricks Query Loop

A user asked:

Do you know what the best way to query an image from metabox gallery?

I would like to query the top 3 images from a metabox gallery but there doesnt look like an easy way. The only way I found is to use the gallery element from bricks but customization is limited.

I would like to set a block as a query loop and add an image element on it so I can do more things with it

This Pro tutorial provides the steps to set the images uploaded/selected in a Meta Box "Image Advanced" type of custom field as the source of images of an Image element in a Bricks query loop of type Posts → Media.

Step 1

Create an Image Advanced field for your desired post type or a specific post.

In this example, we created one called page_gallery for all Pages.

If you'd like to restrict the number of images, enter a number in the "Max. number of files" field.

Step 2

Edit your Pages and populate the field.

Step 3

Edit your Page/template with Bricks.

Add a Section having this structure:

Heading is of course optional.

Enable query loop on the Block.

Click on the query icon and select Media in the Post type control.

Select the Image element and set its data source to

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to 390+ Bricks code tutorials with BricksLabs Pro