Title: ACF &#8216;Image&#8217; Field Returns NULL
Last modified: January 4, 2021

---

# ACF ‘Image’ Field Returns NULL

 *  [aspsa](https://wordpress.org/support/users/aspsa/)
 * (@aspsa)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/acf-image-field-returns-null/)
 * Greetings and Happy New Year.
 * I have the Advanced Custom Fields WordPress plugin free version, version number
   5.9.3 and created a custom field group. It contains a “Tab” type custom field
   labeled “Overview and has a “Group” field within it labeled “Basics”. “Basics”
   group contains “Tab” field labeled “Images”. Inside the “Images” sub field are
   three “Image” type custom fields, each returning an “Image Array”.
 * For example, the first image field has the field name “product_image_01”. All
   of its remaining field descriptors are at their default values. The ACF custom
   field group itself is assigned to a custom post type for which I created a custom
   post type template. Here is the code in question for the custom post type template.
 *     ```
       <?php
       $product_image_01 = get_field("product_image_01");
       var_dump($product_image_01);
       ?>
       <img src="<?php $product_image_01; ?>" />
       ```
   
 * The “var_dump” function returns NULL, even though I assigned an image to the 
   custom post that is associated with the custom post type to which the ACF custom
   field group is assigned. I received a NULL return despite the image return type(
   array, url, id).
 * I also separately tried the following as a test, although I do not see why it
   would be necessary to associate a product image with a WP user:
 *     ```
       <?php
       $author_id = get_the_author_meta('ID');
       $author_pi_01 = get_field('product_image_01', 'user_' . $author_id);
       echo $author_pi_01;
       ?>
       ```
   
 * This did not work either. In fact, it returned no response at all.
 * Thus far, I was able successfully to return data from a variety of other ACF 
   custom field types (text, url, text area, range, select, number) defined elsewhere
   under the “Basics” group. I only have a problem with the ACF ‘Image” field type.
 * I would appreciate guidance on returning an image result in this scenario. Thank
   you.
    -  This topic was modified 5 years, 4 months ago by [aspsa](https://wordpress.org/support/users/aspsa/).
    -  This topic was modified 5 years, 4 months ago by [aspsa](https://wordpress.org/support/users/aspsa/).
    -  This topic was modified 5 years, 4 months ago by [aspsa](https://wordpress.org/support/users/aspsa/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 4 months ago](https://wordpress.org/support/topic/acf-image-field-returns-null/#post-13863564)
 * I recommend asking at [https://wordpress.org/support/plugin/advanced-custom-fields/#new-post](https://wordpress.org/support/plugin/advanced-custom-fields/#new-post)
   so the plugin’s developers and support community can help you with this.
 *  Thread Starter [aspsa](https://wordpress.org/support/users/aspsa/)
 * (@aspsa)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/acf-image-field-returns-null/#post-13864022)
 * Steve, I appreciate the reply and will repost to the link you provided. Not sure
   if I am able to delete this post, as I do not want to cross-post if possible.
 * Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘ACF ‘Image’ Field Returns NULL’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [custom post](https://wordpress.org/support/topic-tag/custom-post/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [aspsa](https://wordpress.org/support/users/aspsa/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/acf-image-field-returns-null/#post-13864022)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
