Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACF only showing image ID #400

Open
monckey100 opened this issue Mar 2, 2022 · 7 comments
Open

ACF only showing image ID #400

monckey100 opened this issue Mar 2, 2022 · 7 comments

Comments

@monckey100
Copy link

If you select image array or image url it does not change anything, the latest update broke the image content type and now it only shows image id.

@tcpriceweber
Copy link

Upgrading ACF above 5.10.2 broke more than that for us. the v2 API started returning a bunch less data.

@fsfgsagerahgearge
Copy link

It's not showing the media ID, that would be helpful because you could then reconstruct the path. It is showing the attachment ID. Not even the media ID.

@fsfgsagerahgearge
Copy link

This is happening for ALL attachments! Even files, it's not only images!

@rubycon
Copy link

rubycon commented Mar 7, 2022

Since the last releases ACF default to its light REST API format. You can switch back to the standard format with an URL param (acf_format=standard) or globally with a WordPress filter :

add_filter('acf/settings/rest_api_format', function () { return 'standard'; });

cf. https://www.advancedcustomfields.com/resources/wp-rest-api-integration/#controlling-output-format

@fsfgsagerahgearge
Copy link

fsfgsagerahgearge commented Mar 7, 2022

Since the last releases ACF default to its light REST API format. You can switch back to the standard format with an URL param (acf_format=standard) or globally with a WordPress filter :

add_filter('acf/settings/rest_api_format', function () { return 'standard'; });

cf. https://www.advancedcustomfields.com/resources/wp-rest-api-integration/#controlling-output-format

Frames this as an intended feature.
Within wordpress however I get the option to select the return value, one of which is URL. Setting this does not return the URL however, it just returns the attachment ID no matter what.

This breaks so many pieces of software relying on return types.

@LuLue7775
Copy link

Does this still work?
In my case, it's not even working appending ?acf_format=standard at the end of request.

@monckey100
Copy link
Author

Does this still work? In my case, it's not even working appending ?acf_format=standard at the end of request.

I literally was only able to get this to work by rolling back to an older version...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants