Home › Forums › General Issues › Image Field stays blank
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?
Thanks.
I was having this problem yesterday (using WP4 and the latest ACF Pro 5.0.8).
I fixed it by rolling back to the 5.0.7 and that seemed to fix it. Hope this offers you a temp solution that will allow you to move forward. 🙂
Good to know! I thought I was going crazy. Thanks! Hopefully Elliot addresses this soon.
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’.
In my case my selected image was bigger than the preview size. I have my preview size set to thumbnail, and my selected image is 1500×700
Also getting this, have rolled back to 5.0.7 in the meantime
I had this same issue. Once I changed my WordPress thumbnail size to something very small, I had to re-upload the image files that previously didn’t work. I believe the initial versions retained their larger thumbnail 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!
Plugin boilerplates can do some of the heavy lifting during initial development. We look at four options to speed up your plugin creation. https://t.co/ZtMsdBxAHw
— Advanced Custom Fields (@wp_acf) June 5, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.