Title: multiple image import with custom addon
Last modified: September 16, 2019

---

# multiple image import with custom addon

 *  Resolved [bgpress](https://wordpress.org/support/users/bgpress/)
 * (@bgpress)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multiple-image-import-with-custom-addon/)
 * Hello,
 * I wrote a custom addon to import multiple images into a custom field, it looks
   so simple, but I am stuck.
    The field structure in the database looks clear, 
   a simple serialized array: [a:10:{i:0;s:2:”26″;i:1;s:2:”27″;i:2;s:2:”28″;i:3;
   s:2:”29″;i:4;s:2:”30″;i:5;s:2:”31″;i:6;s:2:”32″;i:7;s:2:”33″;i:8;s:2:”34″;i:9;
   s:2:”35″;}] There are ten images in the array, each numbered and the gallery 
   ID attached. The addon reference documentation says “Your add-on’s import function
   will be passed the image data as an array.”. The addon downloads the images to
   the media library, but the array does not show up in the custom field. Is there
   a difference between the source and target arrays? Any help appriciated.
 * $estatik_addon->import_images( ‘property_images’, ‘Images for items’ );
 * function estatik_img_addon_import($post_id, $data, $import_options) {
    global
   $estatik_addon; $key = ‘es_property_gallery’; add_post_meta( $post_id, $key, 
   $data ) || update_post_meta( $post_id, $key, $data ); }

Viewing 1 replies (of 1 total)

 *  Thread Starter [bgpress](https://wordpress.org/support/users/bgpress/)
 * (@bgpress)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/multiple-image-import-with-custom-addon/#post-11939081)
 * All right, I figured out the solution, indexing was different.

Viewing 1 replies (of 1 total)

The topic ‘multiple image import with custom addon’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

## Tags

 * [addon](https://wordpress.org/support/topic-tag/addon/)
 * [array](https://wordpress.org/support/topic-tag/array/)
 * [custom field](https://wordpress.org/support/topic-tag/custom-field/)
 * [serialized](https://wordpress.org/support/topic-tag/serialized/)

 * 1 reply
 * 1 participant
 * Last reply from: [bgpress](https://wordpress.org/support/users/bgpress/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/multiple-image-import-with-custom-addon/#post-11939081)
 * Status: resolved