Image Masonry

The Image Masonry display format renders an ACF Gallery field’s images in a Macy.js-powered masonry layout — each image keeps its original aspect ratio and packs into the available column space without cropping.

The format is well-suited to mixed-aspect-ratio collections (mood boards, portfolios, news galleries) where the visual interest comes partly from the varied image shapes.

Supported Field Types

The Image Masonry display format supports the following field types:

  • Gallery

Customization

Sidebar controls cover the column count, the click behavior, image spacing, and the rendered resolution. Aspect ratio and scale controls are intentionally hidden — masonry preserves each image’s native ratio.

CustomizationDescriptionNote
Column countNumber of columns per breakpoint (desktop / tablet / mobile). Range: 1–8.
On click actionWhat happens when a visitor clicks a tile. Options: Do nothing, View in lightbox, View full size on same tab, View full size on new tab.
Image spacingPixel gap between adjacent tiles. Range: 0–100.
ResolutionWhich registered image size is loaded as the src.
Empty MessageToggle (“Show message if empty”) plus fallback text shown when the gallery has no images.
Layout VariationsSwitch the variation to render the same gallery as a grid or carousel layout instead of masonry.The Grid / Carousel / Masonry variations share the same underlying block — switching only changes the type attribute.

The block also supports the following standard WordPress block controls: Block Alignment (wide, full), Border (color, width, radius applied to each tile’s <img>), MarginPadding, and a Duotone Filter applied to every image.

Note: Aspect Ratio and Scale controls are hidden for the Masonry layout because the layout relies on each image keeping its native ratio. To force a uniform ratio, use the Image Grid layout instead.