Home Forums ACF PRO Image field not working in Options page


Image field not working in Options page

  • Hi there,

    I’m having a strange issue on an options page in ACF Pro version 5.0.8.
    In my functions.php I added the following code to add an option page to my wp backend:

    if( function_exists('acf_add_options_page') ) {
    		'page_title' 	=> 'Thema Opties',
    		'menu_title'	=> 'Thema Opties',
    		'menu_slug' 	=> 'thema-opties',
    		'redirect'	=> true
    		'page_title' 	=> 'Thema Header Opties',
    		'menu_title'	=> 'Header',
    		'parent_slug'	=> 'thema-opties',
    		'page_title' 	=> 'Thema Footer Opties',
    		'menu_title'	=> 'Footer',
    		'parent_slug'	=> 'thema-opties',

    In ACF I added a new group called ‘Header Logo’ with 2 image fields called ‘website_logo_vector’ & ‘website_logo_fallback’ with all the default settings (return value: Image Array) and assigned to the Options Page called ‘Header’.

    The fields show up correctly, and I can even upload an image with the field, but as soon as I press ‘select’ in the wordpress media manager, it just won’t insert the image. The field still says ‘Add Image’?

    I tried using the 2 fields on a plain page and that isn’t working either!
    When I add a new image field called ‘test’ on a plain page, it does work?
    Very strange… Any ideas?

    p.s. I rolled back to version 5.0.0 and that works perfectly, so I think it’s some sort of bug

  • I also have the image field not working in 5.0.8

    But it’s not on an Options page. It’s on a Custom Post Type edit screen.

    “as soon as I press ‘select’ in the wordpress media manager, it just won’t insert the image. The field still says ‘Add Image’”

    So maybe this issue effects more than just Options pages.

    Console shows:
    Uncaught Error: A "url" property or function must be specified

  • I have the same problem, and i’m using the Flexible Content with a image field inside 🙁

  • I can confirm this bug. I just updated to 5.0.8 and can’t use the image field anymore (neither on options pages nor anywhere else). Console gives me this:

    Uncaught Error: A "url" property or function must be specified


    Did some further testing and found out that only images <=1024 pixels width are affected. If I upload an image that’s 1025 (or more) pixels wide, it works.

    Maybe that helps.

  • Okay, here’s a quick workaround until the bug has been resolved:

    In the admin panel where the field groups and fields are defined, you have to set the preview image of each image field to “thumbnail”. After that, the upload/selection of an image won’t fail anymore. Except the uploaded image is even smaller than 150×150 pixels (the standard size of the WordPress thumbnails).

    As long as it’s larger than that, you’re fine.

  • Glad to see I’m not the only one 🙂
    I can confirm supernovae’s quick fix, however this doesn’t work with SVG images unfortunately…

  • I’m getting this error also. Was working fine until latest PRO update on Sept 13.

    Also using svg files on current project. The quick fix works for jpg/img fine but obviously not for the svgs.

    Any word on an update with proper fix?

  • Reverting to ACF5.0.7 corrected this issue for me.

    In my experience the Image field worked fine for regular custom fields, however it was breaking when Image fields were added to repeater objects.

  • Any word on an update with proper fix?

    I don’t know, are we supposed to report the bug somewhere or are the developers reading the support forums too?

  • Hi guys

    Sorry about this frustrating bug. i have found and fixed the issue and re-uploaded the plugin files.

    Please login to your ACF store account and re-download the plugin (only files changed are js/input.min.js and js/input.js)

    Thanks for your patience and help finding the bug!


  • Thanks Elliot!
    I can confirm the fix works!

  • Awesome! Thanks a lot, Elliot.

  • Unfortunately reinstalling the plugin is not working for me. Not sure why. -Rich

  • Its not working for me too, with the last version 5.0.8 :S

  • Any further updates on this? I’ve tried to replace the plugin a few times, but it has not fixed the problem -Rich

  • @Elliot maybe it helps if you change the version number for dismiss every cache problems. But I think there is some other bug. I have still some problems with the url property.

  • For anyone who is hosting with WPEngine. Be sure to turn off object / transient caching after re-uploading the plugin. This was what was causing the problem after following @Elliot Condon’s instructions. After doing that, the image field started working again.


Viewing 18 posts - 1 through 18 (of 18 total)

The topic ‘Image field not working in Options page’ is closed to new replies.