Bulk Image Downloader for WordPress Users

A tool for downloading images from your WordPress.com blog to your local machine. It is also an example of how to use XML RPC service in C#.

Executable : WpBulkDownloader-Alpha-Executable.zip
SourceCode : WpBulkDownloader.zip

Contents

  • Introduction
  • Background
  • Software Requirements
  • How to use
  • How it works
  • FAQ

Introduction

This is a tool that helps you to download all of your images that you posted in your blog. This tool is created especially for WordPress.com users but it will support all other blogging softwares in future. You will definitely need this tool when you want to move your blog from wordpress.com to self-host.

WP Bulk Image Downloader (Alpha) for WordPress Users

Background

My blog was hosted on WordPress.com last year. I had too many images uploaded in my free space. When I wanted to move my blog to self-host, I noticed that there is no way to bulk-download all of my images from WordPress account to my local disk. I didn’t want to copy each and every images manually so I wrote this tool that can scan each and every urls from my blog and create the directory based on the URL. And then, download them into my local harddisk. It’s just 2 hours program that I wrote at that time. So, I’m sure that there won’t be all features that you want in this program. But don’t worry. Just drop a comment in this post. I will add the feature that you want in next release.

Software Requirements

How to use it?

The steps are very simple.

  • Configure your blog in Bulk Image Downlader. Click “Options” and fill your blog URL, user name and password as picture below.

WP Bulk Image Downloader - Options

  • Click “OK” button to save your configuration and close the dialog
  • Click “Get Files” button to get the list of image URLs from your blog. (You may need to wait a few minutes while retrieving the list of images from your blog.)
  • After retrieving the list of Image URL, you can click “Download” button to download the images to your local disk. (You may need to wait a few minutes while processing. )
  • After that, you can check all of your images in “Downloaded Images” directory.

How does it work?

Note: This is for those who like to read the sourcecode and want an explanation about codes. If you are just a normal user, you may skip this section.

Firstly, the program will read the user name, password and blogurl from config file. It will append “xmlrpc.php” which is the standard XML RPC interface for WordPress at the end of blogurl string. Then, it will invoke getRecentPost() API of wordpress. I used opensource XML-RPC.NET library in this sample. As there is no getPosts() API in xmlrpc.php, we have to use the alternative method (getRecentPost() API) for retrieving the posts from the blog. The max number of posts is set to 1000 in the program. If you have more than 1000 posts in your blog, you probably need to change the default value.

If the authenticating is successful then we will get the list of posts from the blog. So, we have to filter the URL of images from the contents. Initially, I was thinking to filter <img> tag from the content. But there are some cases that we used big image in <A> tag and small images in <img> tag. So, I decided to filter the <img> tag and <a> tag from the contents based on the extensions (*.jpg, *.png, *.gif) by using regular expression. After that, I shows the list of URLS in ListView.

When the user clicks “Download” button, I start downloading the image one by one. (Note: I used C# downloader class which is written by Shailen Sukul in this example. ) Based on the URL, the program will create the directory accordingly. For example, If the image URL is “http://your.wp.com/2009/09/image1” then the program will create the directories like “09” folder under “2009” folder under “/Downloaded Images/” folder. So, you can easily upload all of your images to your new host via FTP.

That’s all about how Bulk Image Downloader works. If you have any question, please let me know.

FAQs

1. Can you make the better UI for this program?

Yes. Of course. I’m thinking to change this Windows Form to WPF version so that you will definitely get the better UI for this program.

2. The form is freeze while downloading the images. Why?

Sorry about this issue. For the time being, all processes are running in single thread so that UI will be freeze while processing. I will separate the UI and logic into different thread in next release.

3. Can I request new feature?

Yes. Of course. This is the main reason why I released it as alpha. Feel free to drop a comment in this post. I will make a list of feature requests and will be added in next version.

75 thoughts on “Bulk Image Downloader for WordPress Users

  1. Michael, i found this tool and it seems to be THE solution to all of my problems… BUT (of course there is a but)

    I can’t download any images from april 2008 and forth… it seems to work fine with every other image from 2007 to that date…

    I don’t have more than 1000 posts, but if you count posts, comments, and tags, the number is far greater than 1000…

    Could it be the reason? How do I change that? I have NO IDEA on programming, nor how to compile a file or something, so any help would be very much appreciated

    Thank you!!!

  2. Michael, I’m having the same problem as det here. The software won’t download images older than april 2008. This probably is a simple bug.

  3. perfect! made the move from wordpress.com to my own hosted server with nary a hicucp. fantastic plugin. thank you very much.

  4. After setting the options and clicking Get files the download button becomes available but there are no images listed. Am I doing something wrong? I am running it against a wordpress.com blog that only has three posts, two have images. I would think those two images would show up. Thanks for your help.

  5. I’m getting an error message: “Invalid URI: The format of the URI could not be determined.”

    Running win 7 64bit.

  6. This does not appear to work at this time. All I get are links to a few of the images on the front page, none in the photo gallery.

  7. Thanks! Fantastic idea. Unfortunately, I appear to be in the camp that’s gets incomplete results. I had FTP access so your tool guided me to the directory structure I needed, but I would be happy to assist you in fixing the tool if you’d have any interest.

  8. Hi Clayton,

    Thanks. It would be very helpful if you assist me in fixing the tool.. I’m planning to find out the problem of that tool within this weekend. I would love to re-write it to make more users friendly but I have to check my spare time since I have full-time work, master course, 8 months-old baby. :)

    How do you like to assist me? Maybe, we can focus on fixing the bug first and then, we can see whether we should change the flow or not.

  9. I am trying to use this to get images from one self-hosted wordpress installation to another one, and I get ‘ Response from server does not contain valid XML’. WordPress version is 3.2.1 and XML-RPC is enabled.

  10. i have the same problem coming up “Response from server does not contain valid XML”

    does any one no how to fix ?

    really need an idea hear as hosting is about to close the account and i no longer have ftp access. so i need to get all images off the blog!!!! HELP ha

  11. can I ask if there’s an easy way to import the downloaded photos to blogger w/o having to upload them one by one (and having to edit the image url in each post one by one)?

    I know I’m one of the few who want to migrate from wordpress to blogger, but wordpress is not enabling me to have custom domain with the “www”, so I’m force to migrate out..

  12. שלום, אני אוהב את הבלוג שלך. האם יש משהו שאני יכול לעשות כדי לקבל עדכונים כמו מנוי או משהו? אני מצטער שאני לא מכיר RSS?

  13. Hey man, your program looks exactly like what i need, but i have to ask something before using it: the original images will remain online or are them deleted from wordpress.com servers?

  14. Hi, I’ve managed to ‘get files’, but when I click Download nothing happens – ive waited a good while for about 100 images… any ideas? where would they automatically download to?

    Many thanks! I thought it would be easier to move from free wordpress blog !

  15. I thought I’d cracked it, but I’ve just realised that when I press Get Files, it is not getting all the image files – eg it is not registering 2013 folder – ideas ideas?
    Thanks

  16. Hi Sally,

    Thanks! Sorry for late reply.

    Are you still having problem? I wrote this tool long time back. Not sure whether it’s still working with latest version of wordpress. If you can tell me what problem you are facing, I will try to look at it during weekend.

  17. Hi Michael, I love your bulk image downloader, but I am having trouble too. It only seems to look for very recent images. It does not find older images, or images that are not on the front page of my blog. If images are located in different tabs on my blog it ignores them. It would be great if you could help me.

  18. Hi

    I am trying to use your bulk image downloader, but I am getting errors.

    Unhanded exception has occured in your application….. Then it states Reponse from server does not contain valid XML

    Can you help?

  19. Does this work in win 8.1 – 64-bit? I have .net 4.0 enabled (includes 3.5). I tried run as administrator and ran in compatibility mode. I filled in the options, press get files and it locks up for about 2 seconds. No files are displayed, but the download button becomes active. any hints?

  20. That’s great news. what did you compile it with? its been a while since I compiled anything, so perhaps email would be easier to send it… if you don’t mind. my address is bretg AT northvalleylibrary DOT org. You may need to rename it from .exe to something like .ex_ before zipping it. thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *