Home › Forums › Bug Reports › About code example in image documentation › Reply To: About code example in image documentation
That example would be used if you change set the return value of the field to ID
.
This example shows how to display the selected image when using the ID return type. This return type allows us to efficiently load only the necessary image data.
If you’re returning an image object there’s really no need to use the wp_get_attachment_image()
function because the returned array contains all of the image information for all sizes and ACF runs this function in order to build the value returned by the field. You can see wht’s returned in the image array by following https://www.advancedcustomfields.com/resources/debug/
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.