How to upload and add image to WP gallery programmatically? How to upload and add image to WP gallery programmatically? curl curl

How to upload and add image to WP gallery programmatically?


WordPress v3.5 now has some great drag and drop functionality for doing bulk image uploads. Your post seems to imply an automated process where a human wont be involved.

There are 2 articles that have been written since your question was asked. Both provide slightly different solutions to your issue. I hope these help someone:

Programmatically importing thousands of featured image post thumbnails into WordPresshttp://www.zdnet.com/blog/diy-it/programmatically-importing-thousands-of-featured-image-post-thumbnails-into-wordpress/118

How To: Upload Media via URL Programmatically in WordPresshttp://theme.fm/2011/10/how-to-upload-media-via-url-programmatically-in-wordpress-2657/