I have a specific need to import many post with featured images into a custom post type. The issue is, I need this to be a script because it runs off of another system that collects all the data. I currently have the custom post types setup and I have the data to be displayed in the custom post type using custom templates to pull and display the data (lists and profile pages).
I would like to be able to add posts manually (I don't see this being difficult) and add a featured thumbnail using WP built in system. I cannot seem to find any data on how to call the image script directly and pass in the images for it to process and return the data I need for the insertion.
Is this possible? Or do I need to just do this all by hand and just add custom fields to each post to have the two thumbnails I need for the pages? I would rather have this go into the database without the custom fields if possible.
Thanks for any light you can shine on this.