Extending WP’s upload/insert media functionality
Both of these are possible. Insert Attachment into Media Library By using the wp_insert_attachment function, you can insert your uploaded images to the Media Library. This is the example code from the Docs: <?php $wp_filetype = wp_check_filetype(basename($filename), null ); $wp_upload_dir = wp_upload_dir(); $attachment = array( ‘guid’ => $wp_upload_dir[‘baseurl’] . _wp_relative_upload_path( $filename ), ‘post_mime_type’ => $wp_filetype[‘type’], … Read more