I have added code to my app from acf to create an image field on an option page. I’m saving the return_format as URL but the image id gets returned instead. I have tested also passing the object and pulling the URL, but in that case also the image id is returned as well.
Any help would be much appreciated.
This is how I’m retrieving the field:
is_null( get_field('header_image','option') ) ? false : get_field('header_image','option');
This is the code for creating the field:
array(
'key' => 'field_57157d50cef69',
'label' => 'Header Image',
'name' => 'header_image',
'type' => 'image',
'instructions' => 'Select the image you want to show in the menu of the mobile app.',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array(
'width' => '',
'class' => '',
'id' => '',
),
'return_format' => 'url',
'preview_size' => 'thumbnail',
'library' => 'all',
'min_width' => '',
'min_height' => '',
'min_size' => '',
'max_width' => '',
'max_height' => '',
'max_size' => '',
'mime_types' => '',
),