WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am redoing some of my older blogs and I noticed with the new themes most of them take advantage of featured images which is fine. The problem is a lot of my older posts that was never set either because I did not use it or because it didn't exist.

Now I know of the featured thumbnail plugin the regenerates your posts and it grabs the images from your post and makes a thumbnail which is great and that works, but I have some posts where the images were not stored in the uploads folder where the plugin seems to be looking and those posts fail.

Any thoughts on how I can get these featured images without going through every single post manually?

share|improve this question
up vote 0 down vote accepted

You need to first download those external images then you can attach and set them as the post thumbnail.

To download and attach you can use the media_handle_sideload() function.

I wrote a plugin that will search through all your posts and pages and download and attach any external image into the media library. It also has the option of setting the first image as the featured image.


share|improve this answer
Thank you so much this was exactly the tool I was looking for – David May 19 '13 at 10:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.