How to Use ACF Image and Gallery Fields in Divi 5 (No Code)

Show ACF images in a Divi 5 gallery by choosing the post type and field from dropdowns, with no PHP.

ACF Cover Photo field on a project and the resulting image gallery in Divi 5

To build a Divi ACF gallery without code, add HappyDivi Gallery, set Content Source to ACF Image / Gallery Field, then choose your post type and field name from the dropdowns. The gallery follows the field automatically.

Advanced Custom Fields keeps content tidy: a cover photo on each project, a headshot on each team member. Showing those images well is the hard part. Usually it means a custom template, but it does not have to.

Which ACF Field Do You Need?

FieldHoldsAvailable inGood for
ImageOne image per postACF freeTeam headshots, project covers, logos
GalleryMany images per postACF ProProperty photos, case study screenshots

What we tested

We built this guide with the free ACF plugin and an Image field. HappyDivi Gallery also lists Gallery fields in the same dropdown, but we did not test one for this article because that field needs ACF Pro.

Only need one image?

Divi's own Dynamic Content can place a single ACF image into an Image module without any plugin. HappyDivi Gallery is for showing images from many posts or fields as a laid-out gallery.

Step 1: Create Your ACF Field

Go to ACF → Field Groups and add a new group. Our demo calls it Project Details.

  1. Add a field and set Field Type to Image.
  2. Give it a clear name. Ours is cover_photo.
  3. Under Location Rules, show it on your post type, such as Project.
ACF field group settings with an Image type field named Cover Photo

A simple Image field in the free ACF plugin.

Step 2: Add Images to Your Posts

Open a few posts of that type and upload an image into the new field. Add a title and alt text in the Media Library as you go, because good alt text helps accessibility and image search.

Editing a project in WordPress with a Cover Photo image uploaded in the Project Details field group

Our new field, on a demo project.

Step 3: Connect the Field in Divi

Add a HappyDivi Gallery module. Under Image / Content Source:

  1. Set Content Source to ACF Image / Gallery Field.
  2. Set Query Post Type to your post type.
  3. Choose your field under ACF Image / Gallery Field.
HappyDivi Gallery set to ACF Image / Gallery Field with Cover Photo selected, beside the resulting gallery

Three dropdowns, and the gallery shows the images from your field.

Step 4: Choose a Layout and Lightbox

From here, everything works as it does for any gallery. For most uses, choose Grid with Landscape (4:3), or Portrait (3:4) for headshots. Under Click Action, keep Open in Lightbox. For long sets, turn on pagination.

Common Problems

My Field Is Not in the Dropdown

Check ACF is active, the field type is Image or Gallery, and Query Post Type matches its Location Rules.

The field exists but is empty. Add images to a few posts and reload the builder.

It is an ACF Pro feature. You can use one Image field per post instead.

Frequently asked questions

Do I need PHP to show ACF images in Divi 5?

No. With HappyDivi Gallery, you pick the post type and field from dropdowns. No template, query or shortcode is needed.

Does it work with the free version of ACF?

Yes, with Image fields. That is how we built this guide. The Gallery field, which holds many images per post, requires ACF Pro.

Can I use the lightbox with ACF images?

Yes. Layouts, the lightbox and pagination are available with the ACF source just as with other sources.

Want the full picture? The Complete Divi 5 Gallery Guide covers every source, layout, lightbox, filter and pagination option.

Get the next Divi 5 guide

New guides and plugin news from HappyDivi. Unsubscribe any time.

Rubait Hasan

Written by

Founder & Product Builder

Rubait has been building for Divi since 2017. He founded DiviZoom in 2019, sold it in 2022, and started HappyDivi when Divi 5 rebuilt the builder from the ground up. He writes the code behind HappyDivi's plugins and answers support himself.

More articles by Rubait

Get the next Divi 5 guide

New guides and plugin news from HappyDivi. Unsubscribe any time.