The attach_image field allows you to upload and select image from WP Media. It returns the ID of the attachment.
Map Usage:
array( 'name' => 'field_id', 'label' => 'Field Label', 'type' => 'attach_image', // USAGE ATTACH_IMAGE TYPE 'description' => 'Field Description', )
Example:
Register a new shortcode with filed type: attach_image
add_map( array( // 1st shortcode element 'my_shortcode' => array( 'name' => 'My Shortcode', 'description' => 'This is my shortcode', 'icon' => 'my-class-icon', 'category' => 'Content', 'params' => array( //1st field array( 'name' => 'image', 'label' => 'Upload Image', 'type' => 'attach_image', 'admin_label' => true, ), //2nd field ) ), // 2nd shortcode element ) // End Arrays ); } // end my_wp_init() ?>