Home › Forums › Add-ons › Gallery Field › Getting Image URL when using Gallery that's returning ID › Reply To: Getting Image URL when using Gallery that's returning ID
You are returning the image id but you are attempting to use the value as if you are returning an array echo esc_url($image['url']);
.
When returning the ID you need to use WP functions to get the image, like wp_get_attachment_image_src()
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.