I have an ACF Gallery field set up:
In my layout I have a DC looper provider set up:
I am then consuming it as a column.
Now, in each column is an image element that is using {{dc:looper:item}}
as the src and using the same string for the alt text: {{dc:looper:item}}
:
Here is the output when viewing page source:
<img src="https://testdomain.com/wp-content/uploads/2025/02/Dummy-5-e1.jpg" width="200" height="200" alt="585" loading="lazy">
Notice that the same Dynamic Content string outputs the full path of the image when used in the src field but when used in a text field like “alt”, it outputs the ID of that image.
I obviously don’t really want to use this as the alt text but I do need the URL of the image for other reasons I intend to use in my loop. But this behavior is frustrating. And the documentation for ACF Multi Dimential fields is unclear about how to reliably retrieve the URL of the image itself in a case like mine.
I have already tired changing the Return Format and to no avail. I also do not want to change the return format as array
seems to afford me the most options. Can someone please let me know what I need to do to get this done?
I do think the docs could illuminate this concept better than it does currently. Please help asap.
Thanks in advance.