I added an image field to a custom post. After selecting an image from the Media library, the field stays blank.
Console spits out “Uncaught Error: A “url” property or function must be specified”
Does anyone have any idea of what the issue is and/or how to fix it?
I’m also having this issue and can’t figure out how to roll back to 5.0.7, what am I missing?
EDIT: nevermind, I figured out what the issue is and will work around it for now.
ISSUE: For those that are curious, the issue arises if you select an image with original dimensions that are smaller than the ‘Preview Size’ size you’ve set.
By default when you create an Image ACF field, the ‘Preview Size’ will be the default WordPress 150×150 ‘Thumbnail’ size. The image I was trying to select was 140×140 and ACF was struggling to find the preview image to display so it just spat out the error.
I fixed it by going back to my ACF panel and selecting my custom image size for the ‘Preview Size’, and it works just fine.
Obviously this isn’t ideal, and should be fixed in 5.0.9 but for anyone looking to avoid rolling back their ACF version and keep working in the meantime I suggest just telling ACF to use a really small ‘Preview Size’.
You must be logged in to reply to this topic.
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've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.