Title: Pods &#8211; Add function with image in $array
Last modified: July 30, 2019

---

# Pods – Add function with image in $array

 *  Resolved [danifola](https://wordpress.org/support/users/danifola/)
 * (@danifola)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/pods-add-function-with-image-in-array/)
 * Hi,
    I am using the add function to add records to pods.
 * I was able to add an image to a custom image field. I have a GUID in a PHP variable
   and I just assigned that variable as part of the array. My custom field of image
   type is called ‘evidencia’.
 * ‘evidencia’ => $evidencia,
 * The question is if I wanted to save that image to the featured image instead 
   of my custom field, what change do I need to do to my code?
 * Thanks.

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

 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/pods-add-function-with-image-in-array/#post-11782986)
 * Hi [@danifola](https://wordpress.org/support/users/danifola/)
 * The featured image is a WordPress core field and is stored as metadata with the
   metakey `_thumbnail_id`.
    Hope this helps!
 * Regards, Jory
 *  Thread Starter [danifola](https://wordpress.org/support/users/danifola/)
 * (@danifola)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/pods-add-function-with-image-in-array/#post-11783025)
 * Jory, that worked out simpler than I thought. I just used
 * ‘_thumbnail_id’ => $evidencia,
 * and it worked fine!
 * Thanks!
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/pods-add-function-with-image-in-array/#post-11783595)
 * You’re welcome!
 * Cheers, Jory
 * PS: The best way to say thanks is to leave a 5 star review at [https://wordpress.org/support/plugin/pods/reviews/](https://wordpress.org/support/plugin/pods/reviews/)
   and (if you’re feeling especially generous) become a Friend of Pods at [https://friends.pods.io/](https://friends.pods.io/)

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

The topic ‘Pods – Add function with image in $array’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/pods-add-function-with-image-in-array/#post-11783595)
 * Status: resolved