There is no setting for the gallery. It returns an array of image arrays. If you want to only return an array of IDs you can do
$gallery = get_field('my_gallery_field', false, false);
the 3rd parameter tells ACF not to format the value and this causes it to return just the list of IDs
the 2nd parameter is the post ID, setting it to false just means the current post
If you are trying to get the array of image arrays and acf is only returning the array of IDs anyway, this is almost always caused by a pre_get_posts filter that is incorrectly filtering the queries that ACF does to get the images. Usually because there is not sufficient logic to rule out these queries before making modifications.
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!
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.