Home › Forums › ACF PRO › Gallery field preformance issue › Reply To: Gallery field preformance issue
Hi @MrShemek
When getting the gallery field’s value, ACF will format it. This means it will load all the image data for each image – resulting in the longer load time.
You should make use of the 3rd parameter for the get_field function which disables the formatting of a value:
get_field('companyImages', false, false)
;
This will load only the DB value without formatting and will return an array of attachment IDs
Cheers
E
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.