2

I need to upload image to WP gallery from server side. So PHP script (in cron) must do the job without my interaction. So I wonder if WP has built in feature for this or should I upload image with CURL to server first and then use some WP functions to add image to post and associate it with post ?

1

1 Answer 1

1

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 WordPress http://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 WordPress http://theme.fm/2011/10/how-to-upload-media-via-url-programmatically-in-wordpress-2657/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.