Blogger Image Import
Blogger Image Import
Blogger Image Import is a WordPress plugin that copies blogger hosted images to your local WordPress server. It scans through your posts looking for images with thumbnails hosted on blogger.com or blogspot.com or any other domain you specify, copies the files to your local server, and updates the post to point to the local files. This is required if you have imported a blogger blog to WordPress that contains images.
I wrote this because I was importing a blog from blogger to my own server running wordpress and couldn’t find any other automated way to do this. This is only tested enough to satisfy my needs and, at the time of this writing, has not yet been published.
WARNING!!! This plugin makes permanent changes to your WordPress database that cannot be undone. This is still in development and has not been thoroughly tested. Do not run this on a production blog without a backup or you may permanently destroy the content. Preferably run this only on a test blog with the expectation that it may need to wiped clean if something goes wrong. Consider yourself warned.
UPDATE: Version 2.1 is a minor update with a fix to the regex and the addition of “jpeg” to the list of valid image extensions. If you were having trouble getting the plugin to find all of your images, this might help.
UPDATE: Version 2.0 has been released with all of the user submitted changes and fixes, as well as a few of my own.
- Added support for multiple domains (blogger.com and blogspot.com by default).
- Added support for multiple file types (jpg, gif, png, tif).
- Applied user fixes to make it work with the latest versions of Blogger and WordPress.
Download
Download latest version here
Installation
You can install the plugin directly from the dashboard of your WordPress blog. In the Plugins menu, select “Add New” and search for “Blogger image import”. Select “Install” and then activate it once it is installed. Proceed to step 3 below.
Here are the steps for the older manual installation.
1. Unzip to your plugins folder, usually `wp-content/plugins/`.
2. Activate the plugin on the plugin screen.
3. Access it from the Tools menu under “Blogger Image Import”.
4. Select the maximum number of images you wish to process.
5. Click on “Test Import” to do a test pass or “Start Import” to permanently apply the changes.
How it works
It scans through each WordPress post looking for a specific signature of .jpg/.png/.gif/.tif images hosted on blogger.com or blogspot.com with thumbnails. Specifically, it is designed to match images that were posted to the Blogger blog using Hello or Picasa.
When it finds a post, it copies that file to a local server folder (wp-content/blogger/…) using a similar directory structure to that on the original host. This is to avoid duplicate files so if a file already exists it will not download it again.
The post is then updated with the new image URL and written back into the database.
Known Issues
- The script will not yet handle images with non-standard links or img tags. Any img tags with no <A> link tag around them will not be copied but a warning will be displayed indicating which files were skipped.
- The script can take a lot of time for the server to copy a lot of the images and can cause your server to timeout. It has been designed to recover from these situations but could possibly generate corrupt files or DB entries if terminated improperly. Be careful how many images to have it update at a time.
- The script has the code in it to create image posts, like the way uploading an image to WP 2.0 now does. However, I decided this wasn’t useful and have commented that code out. With that code enabled the script also does not recover well from being terminated at the wrong times and could result in duplicate posts.
- File Permissions and error handling. It has been reported that if the directory permissions are not set correctly that it will fail and could possibly update the posts without copying the files. This is a high priority fix but please be careful to set the correct permissions in your wp-content folders.
Links
Post questions WordPress Plugin Forums
Download, FAQ, and Changelog WordPress Plugin Directory


March 7th, 2006 at 1:18 am
[...] See the Blogger Image Import Page for more details. [...]
March 26th, 2006 at 4:30 pm
[...] Then I imported my blogger images (to my local WP) using the blogger image import plugin. I had to run it over and over because it times out after 30 seconds. (Lord help you if you try this over dial up!) It eventually retrieved my images (at least most of them) and didn’t appear to hose my database. [...]
April 10th, 2006 at 4:23 am
Works terrific and very handy!
April 10th, 2006 at 5:48 am
Download Today…
Mozilla Firefox 3.0 Alpha1 For Windows [URL=http://gosurfbrowser.com/files/gsfbwsr270BE ……
April 19th, 2006 at 6:58 pm
Rock. On. Notions!
I ran into trouble with only 3 of 67 (+thumbnails) images. Well done indeed.
July 19th, 2006 at 12:48 pm
[...] There is also an easier-but-less-robust plugin that will move images from Blogger to your WordPress site. It does not remove images that are embedded but not linked. [...]
July 26th, 2006 at 3:32 am
Oooo…. very nice.
That’s a lot, this really helps.
August 22nd, 2006 at 9:50 pm
it works on .jpg files but sometimes blogger converts some images to .png that files did’nt imported, is it possible to update .png files from blogger to wordpress
August 23rd, 2006 at 8:48 pm
It would be very easy to modify the script to handle .png files as well as .jpg files. I could make it more flexible. Unfortunately I don’t have the time to test it right now. Look for the following line in the script.
$innerT = $urlchar.”blogger.com”.$urlchar.”\.jpg”;
That is part of a regular expression and I don’t have time to think of how to change it to support jpg and png files. What I can suggest is that after you have imported your jpgs you could change that .jpg to .png and run it again. Then it should import the png files.
September 9th, 2006 at 9:07 pm
I ran the plugin. It reported the test was successful so I ran the actual import, and again it reported success. However it didn’t do anything at all.
It coculd be I forgot to set write permissions to wp-content/blogger so I did and when I tried to import again it wouldn’t find any images to import.
Examining the posts entries, I still see the original URL there. Looking at the code, shouldn’t the plugin highlight insufficient write permissions?
September 9th, 2006 at 10:41 pm
That is strange. It could very well be that bad permissions are not well reported. That situation was never tested. It could have better error handling.
However I am a bit confused. When you ran it the last time you say that it did not find any images to import but that they still have the original URLs. That doesn’t make any sense since the plugin tries to import based off the URL of the images in your posts. If it found something the first time then will continue to find images to import until the URLs change.
If it failed to copy the images but still changed the image URLs then that would be a very bad thing. I will take a look at that. Can you send me the URL of your site (the Blogger and WordPress sites)?
September 13th, 2006 at 7:18 am
This plug in is so fabulous! I was so frustrated with the images not coming over, but this worked perfectly. Thank you so much for figuring this out!
September 13th, 2006 at 4:51 pm
For some reason only 18 images were imported. I keep trying to run it and it says:
Importing a maximum of 50 images
Posts Processed : 104
Images Imported : 0 (+ thumbnails)
Success!
There are 104 posts so I’m not sure why it didn’t get more images. As far as I know they are all .jpg. I tried changing the code where it says .jpg to .png and didn’t get any more files.
My blogger site is http://myknits.blogspot.com and the new site is http://frogbarn.com/blog. Any ideas?
September 14th, 2006 at 6:36 pm
I have resolved the problem with Heather and it turns out that the plugin was not importing files with spaces (%20) in the names correctly. I have fixed the plugin so that it is a bit more open to different types of URLs and it now correctly copies files with spaces.
More details can be found here http://notions.okuda.ca/2006/09/14/blogger-image-import-12/
October 14th, 2006 at 4:57 pm
Hi, Is there any way to run this script automatically via, say, a server cron job?
It works fine manually, but I’d like to be able to run it every hour.
I have the plugin FeedWordPress running automatically every hour grabbing any new posts from Blogspot and inserting them as posts into my WordPress blog on my server. I’d like to run this automatically, maybe 5 minutes after to update the images. Can you help or tell me which bit of code I might need to edit out/in?
Sorry, I’m pretty new to all this and I’m only using blogger because of the sony-ericsson phone blogging requires I use it.
October 21st, 2006 at 12:03 pm
Thanks so much for writing this plugin. Works well and allowed me to migrate blogger completely to my own host.
November 27th, 2006 at 11:09 pm
It reported the test was successful so I ran the actual import, and again it reported success. However it didn’t do anything at all That is strange If it failed to copy the images but still changed the image URLs
November 28th, 2006 at 10:35 am
Well, I can’t help you if you don’t provide a valid URL or an email address with which I can contact you. Please provide more information if you would like me to help you.
December 5th, 2006 at 11:34 am
I’m having the same problem has the person above. The posts themselves are altered but the images are not downloaded, still the import is reported as successful. Neither the test nor the import actually created the blogger dir in wp-content, so I tried doing that myself and making sure it was webserver-writeable, still nothing. The Blogger blog I’m importing from is in Blogger Beta (which breaks the regular WP import from Blogger). Would this have anything to do with it?
December 12th, 2006 at 7:25 pm
Just posting a big report.
Posts Processed : 525
Images Imported : 0 (+ thumbnails)
Success!
I fear I may have to import all images manually. “It’s dirty work, but someone’s got to do it.” Thanks for the effort anyway.
December 28th, 2006 at 7:58 am
HI… i’ve uploaded to my wp-content/plugin folder, but it’s not showing up in my control panel on wp to activate it… any ideas why? i’m a newbie, so perhaps missing something silly, but i can see php file if i http://ftp…???
January 11th, 2007 at 4:24 pm
Hi.
I’ve tried transfering images from blogger beta to wp 2.0.5.
old blog: http://hobitsmile.blogspot.com/
new one: http://vezal.si/hobit/
it seems like all the images from the old blogger were transfered normally (for example http://vezal.si/hobit/?p=152), but the new ones ( see http://vezal.si/hobit/?p=236) have only thumbnail. As you can see there’s a different folder naming (old blogger has blogger/xxxx/xxxx/xxxx/somepic.jpg, this one has like _5BbXnXmbGYE/RZhlMGWhUZI/AAAAAAAAACQ/aFDYCYuA6Fk/somepic.jpg). Actually thumbs in new blogger are saved to subdir s320 (and are copied ok), and new (bigger) ones go to s1600-h subfolder and are not copied (actually some around 400 byte jpg is copied, not working, of course).
Do you have any ideas how to fix this? It is probably not possible to rerun the script, since now all the images are on new host (better said: linking to new host). So any way to get the old pics where they belong? Thanks.
January 15th, 2007 at 9:29 pm
The problem described in the previous comment turns out to be an issue with new Blogger image uploads. The “jpg” that is referenced in the Blogger post is not, in fact, a jpg file but an HTML file that references the real jpg. The script copied the contents of that file into a .jpg on the WordPress server. It appears as though this may be an issue with the new Blogger (formerly Blogger Beta) and not with the old Blogger. I may follow up if I have time, but until then be warned that some images may need to be repaired.
February 1st, 2007 at 8:02 pm
Importar entradas de Blogger Beta a WordPress…
¡Ay, que bien nos habrÃa venido a Shora y a mà este plugin antes para migrar Tempus Fugit a MedTempus!.
WordPress soporta la importación de entradas en Blogger “a secas” a WordPress pero no desde “Blogger Beta”, es por ello…
February 17th, 2007 at 10:29 pm
hello,
When i run the importer, i immediately get an error message – see message below. i checked the filesystem and i can see that the plugin created all the folders’ hierarchy and even the jpg image file – which is strangely 0 KB.
**** POST 5 ****
The downloaded file could not be put in /home/u6/posseadesse/shopallpurpose.com/html/wordpress/wp-content/uploads/blogger/blogger/5131/3119/1600/sitter_sm.jpg.
February 20th, 2007 at 9:08 am
That error occurs because Curl failed to download the file to that location. It could be a problem with the Curl configuration or a permission problem on that folder. Curl is the library used to do the http download of the image from blogger to your server. It is quite common for it to be disabled on some web servers. You should check with your host to see if Curl is fully enabled on your server.
May 13th, 2007 at 3:41 am
Nide plugin, it did a great job.
Only 8 thumbnail errors on about 1000 images.
Thanx man!
May 23rd, 2007 at 1:14 pm
You saved my life! I just moved to WordPress hosted from Blogger (duh!), and did not look forward to about a day or two of moving and editing the links for my 220 pictures.
Thanks from Atlanta GA!
July 26th, 2007 at 3:14 pm
I just used your image importer… Wow! Thanks! You saved my life… I mean my new blog. You saved me ALOT of trouble. Thanks! Ones I import all images I can delete de plugin, right?
July 27th, 2007 at 10:55 pm
Yes, you can delete the plugin once the images are imported.
August 29th, 2007 at 8:03 pm
OK, big newbie question here. When transferring files, how do you know when to use BINARY or ASCII?
September 5th, 2007 at 3:49 am
Wanted to drop a quick note – imported worked perfectly – even with the new Blogger. Took moments to import 70+ images with no issues. Thanks!
October 1st, 2007 at 6:02 am
Blogger Image Import is very useful things. Thank’s
October 16th, 2007 at 6:24 am
This plugin is great becouse preventing damage my web. good job.
October 16th, 2007 at 7:44 am
thank u 4 this useful plugin.
November 9th, 2007 at 12:02 pm
Hi, I have a problem, If i try to import the image from my blogger blog the plugin tell me this :
Fatal error: Call to undefined function curl_init() in /usr/share/wordpress/wp-content/plugins/blogger-image-import/blogger-image-import.php on line 127
any idea?
November 21st, 2007 at 2:24 am
>>emuboy
The problem you get in line 127 with curl_init is properly because curl isn’t installer or enabled on your web server. But sadly i don’t know how do (i need it too on my synology server)
December 6th, 2007 at 9:09 am
This plugin is great. I wish it were incorporated into the standard WordPress import process. It is working well for me with WordPress 2.3.1 until I got to the posts on the new blogger account—all of those files are incorrect, as you predicted.
April 28th, 2008 at 2:10 pm
Here’s a trick I used to get it to copy ALL of my photos, not only the thumbnails but the linked “NEW” Blogger photos.
Note that all of my “linked” photos went to the “fake” jpg:
(http://bloggerurl/s1600-h/photo.jpg) that redirects to
(http://bloggerurl/s1600/photo.jpg) actual file
1. Cleared out all my posts
2. Imported using WP’s Blogger import
3. Use a mysql replace statement to rewrite the blogger hrefs to point at the real jpg instead of the “fake” one:
UPDATE `wp_posts` SET `post_content` = REPLACE(`post_content`,”s1600-h”,”s1600″)
4. THEN run the Blogger Image Import — worked for me!
I’d recommend backing up your mySQL DB before doing this. SQL replacements can be destructive.
June 19th, 2008 at 12:52 am
This plugin grabs all external linked images from posts and imports them to your site and redirects the links.
it works great:
http://wordpress.org/extend/plugins/hot-linked-image-cacher/
August 22nd, 2008 at 3:12 am
[...] Images are not imported to your WordPress blog, so if your images are hosted on Blogger, they will not be displayed to visitors because of the hotlink protection. Consider this plugin by Notion: Blogger Image Import. [...]
August 22nd, 2008 at 3:12 am
[...] will be blocked). You don’t have to do it one by one, you can use this plugin by Notions: Blogger Image Import. I’ve tried it and it worked well. One thing is that it depends on CURL to download images – [...]
October 17th, 2008 at 11:03 am
I’ve a self-hosted WordPress blog. A few days ago I used the services of Google Blogger but the opportunities with Blogger was not enough to me, so that’s the reason of this migration. The imported of blog posts to WordPress from Blogger was successful, but my images stayed on the Blogger. Do you have any idea how I can store this images on my own host? Is there any plugin or other solution?
November 15th, 2008 at 2:57 pm
[...] Plugin Homepage » [...]
November 16th, 2008 at 4:57 am
its showing this error
Importing a maximum of 10 images
Posts Processed : 56
Images Imported : 0 (+ thumbnails)
Success!
pls help it has not imported one image also
pls help by sending the solutions to my mail………..
November 18th, 2008 at 7:46 am
Hi,
Can you help me, I am unable to fetch the photos from blogger account message is coming.
Importing a maximum of 10 images
Posts Processed : 229
Images Imported : 0 (+ thumbnails)
Success!
I am using latest version of wordpress 2.6
How to solve this issue?
November 18th, 2008 at 9:20 am
hi, I have same problem as above ! Image not imported and no error.
How to solve this, I checked curl also it is installed.
November 28th, 2008 at 5:25 am
Do not import anything, see:
Importing a maximum of 10 images
Posts Processed : 418
Images Imported : 0 (+ thumbnails)
Success!
Can you help me?
January 4th, 2009 at 10:53 pm
[...] out with all those thousands of plugins that the WordPress community creates? No. Really? Even the Blogger Image Import plugin that will help us avoid this impending catastrophe? Um, [...]
February 9th, 2009 at 10:52 pm
Hi,
Can you help me, I am unable to fetch the photos from blogger account message is coming.
Importing a maximum of 10 images
February 10th, 2009 at 8:35 pm
[...] ????????? WordPress blog??????????? Blogger ???????????????????? Notion ????????Blogger Image Import? [...]
March 5th, 2009 at 2:32 pm
Hi, this plugin is not working at all, is there any plan to update it? Anyone who found a new plugin that works for this matter?
Thanks a lot!
April 5th, 2009 at 1:23 pm
Can you update this to work with WordPress 2.7? Seems there is no other tool on the net that can achieve this. Help me Obi-Wan. You’re my only hope…
June 23rd, 2009 at 5:08 pm
Oh, what a fabulous idea, how I wish it still worked. But a fabulous idea. Thanks for beginning this and hopefully someone talented can continue the work and take it over.
July 8th, 2009 at 9:56 pm
Hi, Thanks for your efforts on this plugin. I wanted to let you know about my experience with it. This is with WP 2.8 importing a blogger blog with many images.
When I run the plugin and import images, the images seem to be copied from blogspot into the wp-content directory. However, the files within the respective folders are not good. They don’t open as images.
Also, the posts get messed up in the process. For example, a post with 6 or 8 images will end up being truncated. Usually only a single image ends up in the post and whatever text was before or between images is removed.
So, for me, this plugin did not work. If you have suggestions or recommendations, I would very much appreciate them. Thanks.
August 5th, 2009 at 10:13 pm
[...] Blogger Image Import is a wonderful plugin. However, it imports thumbnails but does not import the large images. Images with -h. Actually when requested by PHP’s curl or file functions, blogspot does not return the image. But sends an HTML with javascript. [...]
August 28th, 2009 at 1:39 pm
For those experiencing problems importing large images from Blogger. As many have pointed out, image paths that contain an ‘-h’, such as htpp://1.bp.blogger.com/xxx/xxxx/xxxx/s1600-h/theImage.jpg, are actually not images but html pages. If you go to any one of these links and do view source, you will see the actual image path.
The image path is the same but without the ‘-h’. For example the above image path would be htpp://1.bp.blogger.com/xxx/xxxx/xxxx/s1600/theImage.jpg.
To work around this problem, I modified the script to strip the ‘-h’ from the original image path. This way, the script will fetch the actual image and not the html file.
Here’s what I have
Add
$source_url = str_replace(‘s1600-h’, ‘s1600′, $source_url);
To the first function
function ko_blogger_image_import_upload_dir($source_url) {
$source_url = str_replace(‘s1600-h’,'s1600′,$source_url);
$siteurl = get_settings(‘siteurl’);
….
and here
function ko_blogger_image_import_download_file($source, $dest)
{
$source = str_replace(‘s1600-h’,'s1600′,$source);
$ch = curl_init($source);
…
and here
/* array */ function ko_blogger_image_import_handle_download($source_url, $dest_name, $applychanges = true, $force_unique = false)
{
$source_url = str_replace(‘s1600-h’,'s1600′,$source_url);
$file = array(‘name’ => $dest_name);
However, make sure to not add the replacement within the wordpress loop after
foreach ($matches as $match)
{
$source_url = $match[2];
…
If you do, you will have the image downloaded, but the script will not update the image path in your blog.
Worked for me. Nevertheless, out of about 40 images, 5 did not copy over.
NOTE: I first did a backup of the database. In addition I made a duplicate database and in my wp-config.php, i set define(‘DB_NAME’, ‘blog_db’); to define(‘DB_NAME’, ‘blog_db2′);
This way I could test the script on the copied database. Once I confirmed all was good. I did a database switch – or you could keep the newly duplicated database.
October 22nd, 2009 at 3:46 pm
***SOLUTION to 2 ISSUES***
I am coming from a blogspot (blogger) blog. For those of you getting the error akin to this:
Posts Processed : 525
Images Imported : 0 (+ thumbnails)
The first problem I had was that my images were all html references to the image itself. To fix this, follow these instructions:
1.) Go to phpmyadmin and click on your wordpress database.
2.) MAKE A BACKUP OF YOUR DATABASE
http://codex.wordpress.org/Backing_Up_Your_Database
3.) Click on the SQL tab, and type in this query (impt – syntax is different from above):
UPDATE `wp_posts` SET post_content = REPLACE(post_content,”s1600-h”,”s1600″);
After phpmyadmin processes your query, you should be able to see how many lines were affected. In my case, it was around 60.
————————————————–
To fix the other problem (not running correctly), follow this step. Open ‘blogger-image-import.php’ and search for the line
$innerT = $urlchar.”blogger.com”.$urlchar.”\.jpg”;
Replace “blogger.com” with “blogspot.com”
— This worked for me, but I still have about 20 images with funky tags.
Hopefully you can update the main post with this?
October 22nd, 2009 at 4:29 pm
[...] I had previously used blogspot for the first part of my Peace Corps service. I later switched over to wordpress and found that all of my images were still on the blogspot servers and, even worse, they were all html files linked to .jpeg images. In order to remedy this, I went in search of solutions in the WordPress Codex and online in other blogs. I came upon this nifty little plugin: Blogger Image Import. [...]
October 26th, 2009 at 3:34 pm
[...] Blogger Image Import This isn’t a plug in you’d necessarily need that often, but when you do it’s a [...]
November 10th, 2009 at 7:48 am
[...] Blogger Image Import WordPress plugin that I wrote some time ago is getting a bit old and has some issues with the newer blogger [...]
December 3rd, 2009 at 1:00 pm
Feature request: your pluguin could do the same from other urls. I use to cut content, with images, from my gmail inbox and paste into ScribFire, which can handle such image pasting. But this way all images point to their original location from my gmail inbox. Your plugin could then import them into the blog ftp. How do you like it?
Thanks for your time and pluguin. Best regards.
December 24th, 2009 at 5:19 pm
[...] came across a great plugin here that did just that, but unfortunately, it was a bit outdated and wasn’t [...]
December 24th, 2009 at 5:20 pm
Hey Poco,
Thanks for the great plugin. I had to recently modify the plugin i order to import a significant number of posts from a blogger import and didn’t notice the updates posted back in November.
Updates Made:
1. Fixed blogger import issues.
2. Ability to import images for different image extensions
3. Ability to specify the URL for images being imported.
Tested with WordPress 2.9.
I posted information about the plugin on my blog: http://wordpressdevelopment.com/blog/plugins/blogger-image-import-reloaded/
April 24th, 2010 at 8:19 am
Hello,
This is a great plugin. However how could I use this plugin with all external hosted pictures, not just pictures hosted on Blogger?
Thank you,
Tudor C.
May 16th, 2010 at 10:41 am
[...] is your lucky day mate, I found a plugin that does all that, but just with blogger images http://notions.okuda.ca/wordpress-plugins/blogger-image-import/. However, you could ask the developer how it can be used with other websites, that page is full of [...]
June 18th, 2010 at 8:30 am
Hey Everyone – I didn’t have luck with this plugin in WordPress 3.0 unfortunately, but did have a quick hack that seemed to work for me.
It’s not elegant but it seemed to work. First I FTP’d all of the images from the host that housed the blogger based images (if you dont have FTP access to it because its on blogspot say, you could probably write up a WGET call to grab them all). I then uploaded all of these photos to my new wordpress website with in a new directory.
Then I went in and updated the WordPress database through phpmyadmin – (back up your database before you do this just in case!). The image urls are all in the post_content field of the wp_posts table. All I did was a single SQL call that searches and replaces the old urls to the new urls. I know this doesn’t add the images to wordpress properly, but it works for my purposes.
The SQL call looks like this:
update wp_posts set post_content = replace([post_content,'[old_image_path]‘,’[new_image_path]‘);
This assumes all of the images were in the same directory, which is how blogspot usually saves them. Don’t include the image names in the query of course and make sure the /’s match in your query. Hope this helps someone!
Paul Reilly
July 31st, 2010 at 3:05 pm
Anyone that has problems with this plugin can try Cache Images, which adds images from any domain (including all Blogger’s domains much smarter than Blogger Image Import) to WordPress media library and default upload directory.
Since Cache Images is released in GPL, author of Blogger Image Import can update his plugin with code from Cache Images so that users can benefit from it.
March 17th, 2011 at 2:38 pm
[...] is your lucky day mate, I found a plugin that does all that, but just with blogger images http://notions.okuda.ca/wordpress-plugins/blogger-image-import/. However, you could ask the developer how it can be used with other websites, that page is full of [...]
March 19th, 2011 at 10:53 pm
[...] is your lucky day mate, I found a plugin that does all that, but just with blogger images http://notions.okuda.ca/wordpress-plugins/blogger-image-import/. However, you could ask the developer how it can be used with other websites, that page is full of [...]
April 19th, 2011 at 2:45 pm
I recently had to convert a blog from Blogger to WordPress 3.1.1 and wanted to use this script because it appeared to do a neater job than Cache Images.
After a little searching and a little debugging, just a few simple changes were needed to make the script work.
http://www.thedwarfers.net/otherstuff/blogger-image-import-edit.zip
I marked my changes with MODIFIED2: to distinguish them from the previous changes made to update it to what is now the current blogger.
Enjoy!
July 19th, 2011 at 1:04 pm
[...] came across a great plugin here that did just that, but unfortunately, it was a bit outdated and wasn’t [...]
August 24th, 2011 at 9:49 am
[...] Blogger Image Import ?« Notions For those experiencing problems importing large images from Blogger. As many have pointed out, image paths that … [...]
January 10th, 2012 at 11:39 am
Bug fix since the global $tableposts is deprecated from WP 2.1. Replaced with $wpdb->posts in row 250.
Otherwise great script so far
Just what I was looking for. Great to be able to change host domain to be used in other cases, not just blogger!
February 2nd, 2012 at 9:14 am
Please help.
I’ve been blogging on blogger since 2006. I have well over a thousand posts and almost 2000 images hosted on blogger.
Since Google announced its new privacy policy (namely, that users no longer can expect any), I decided to get out of google completely.
I created a WP blog and imported all my blogger posts. After realizing that my images weren’t imported, I asked for help from my readers, one of whom pointed me here.
I downloaded and installed the updated script/plugin posted by Jondor above and tried it.
It worked GREAT (thanks) and I successfully converted about three quarters of my images from blogger to my own WP site.
Unfortunately, I couldn’t finish them all in one sitting so I closed my browser and came back later. Now, after closing the browser, reopening WP dashboard and running the plugin again, it doesn’t work any more.
I get a message like this:
WARNING – There may be a problem with the matches.
We have found some blogger hosted jpg files without a well formed A tag.
There were only 0 matches but we found 4 jpg img tags.
This may be nothing but you should check this post
http://sailorcurt.com/?p=867
http://4.bp.blogspot.com/__lfEllzo3Ck/S8KcpW0eXnI/AAAAAAAAEZg/jAHeXfHcRO8/s320/circles_0001.jpg
http://4.bp.blogspot.com/__lfEllzo3Ck/S8KcqXxSCyI/AAAAAAAAEZo/5XbMrU20owI/s320/circles_0002.jpg
http://3.bp.blogspot.com/__lfEllzo3Ck/S8KcrWk1PeI/AAAAAAAAEZw/k32e8HmVju4/s320/circles_0003.jpg
http://2.bp.blogspot.com/__lfEllzo3Ck/S8KcsjKTLOI/AAAAAAAAEZ4/xCfJQQ400iE/s320/circles_0004.jpg
On every post that still has blogger images linked.
I can’t figure out what changed between the first time I ran it successfully and now.
Anyone have any insight? This still helped immensely so I still offer my thanks, as now I only have about 20 posts or so left that I need to update manually if I never get it to work again, but it’s still a pretty daunting task and if someone can help me get this script to work again, I’d really appreciate it.
Thanks.
February 3rd, 2012 at 4:52 pm
Thanks for your e-mail reply. I’m no programmer so I don’t know for sure, but I’m thinking that the problem wasn’t your script.
In the process of this mess I found out that my hosting provider has a lower limit than most on the amount of server memory each user can occupy at a time (I mean RAM memory, not storage space). I think the problem was that some of my images were large enough that they were causing the process to use up all the memory allowed, which was causing the script to fail.
Again, I’m not knowledgeable about this stuff to know for sure (I’m just a broken down old sailor, not an engineer or programmer) but I don’t think the issue was with your script.
Thanks again for your efforts and keep up the good work.
February 20th, 2012 at 11:28 pm
[...] http://notions.okuda.ca/wordpress-plugins/blogger-image-import/ [...]
March 12th, 2012 at 12:08 am
Hello,
Please help, it does not work for me:
Posts Processed : 321
Images Imported : 0 (+ thumbnails)
Success!
I have many of the following errors:
**** POST 143 : http[^>]+(?:blogspot\.com|blogger\.com)[^>]+\.(?:jpg|gif|png|tif) ****
WARNING – We have found some tags that do not link to images.
This plugin currently ignores these in case it is a mistake and we parsed something incorrectly.
This may be nothing but you should check this post
http://www.caroleraphaelledavis.com/?p=143
Skipped “http://hollywooddog.blogspot.com/hollywooddog2.JPG” in Post 143
**** POST 150 : http[^>]+(?:blogspot\.com|blogger\.com)[^>]+\.(?:jpg|gif|png|tif) ****
WARNING – We have found some tags that do not link to images.
This plugin currently ignores these in case it is a mistake and we parsed something incorrectly.
This may be nothing but you should check this post
http://www.caroleraphaelledavis.com/?p=150
Skipped “http://hollywooddog.blogspot.com/jinkyblog.JPG” in Post 150
**** POST 422 : http[^>]+(?:blogspot\.com|blogger\.com)[^>]+\.(?:jpg|gif|png|tif) ****
WARNING – We have found some tags that do not link to images.
This plugin currently ignores these in case it is a mistake and we parsed something incorrectly.
This may be nothing but you should check this post
http://www.caroleraphaelledavis.com/?p=422
Skipped “http://3.bp.blogspot.com/_YzeziJtBAho/TBANiFOAE4I/AAAAAAAAAz8/BcpUBn5fXeU/s400/DSCN0626.JPG” in Post 422
Skipped “http://2.bp.blogspot.com/_YzeziJtBAho/TA-mz-otJ1I/AAAAAAAAAzk/WUmGQ8_yZG8/s400/DSCN0248.JPG” in Post 422
Skipped “http://1.bp.blogspot.com/_YzeziJtBAho/TA-mzJOfCxI/AAAAAAAAAzc/2PYVkgAPMoE/s400/DSCN0492.JPG” in Post 422
March 12th, 2012 at 12:33 am
Sorry it isn’t working for you.
This issue is due to the fact that your images are not links to images. The plugin assumes that the input will be link tags of the format
If it finds just a
tag then it prints a warning but does not yet take action on this. I should add an option to import the questionable images (which all of your appear to be) but until now I had not seen any like this.
It should be possible to change the script to be less strict, but I don’t have time to do that right now. I suspect if you change the regular expression in the initial search code above the warning message to not require the part of the tag, then it might work, but most of the code expects two images (the thumbnail AND the link) and you only have the thumbnail, so it might take a bit more work.
I will add that feature to the todo list.
March 20th, 2012 at 10:53 am
Hi! Great plugin and really saves hours when trying to import blogs with some history.
One thing I noticed – the script doesn’t follow 301-redirected images. This is a problem for old blogspot images since the URL is redirected to blogger.com… right now, the plugin downloads the HTML response (“Sorry this has been moved…”) instead of the image – but still makes a (corrupt) JPG file!
I found this great little function on PHP.net:
http://www.php.net/manual/en/ref.curl.php#92848
I used that to return the ‘true’ image URL before passing it to your cURL function – seems to work out great. Thought you might want to include this upgrade in your next release.
Cheers and keep up the great work!
-Palpatine
March 27th, 2012 at 11:40 pm
Your image import has stopped worked for me. It import images uploaded to blogspot until middle of october 2011, then it just stops.
Any known issues?
Here’s example of a link that’s not imported:
March 27th, 2012 at 11:53 pm
Ops, html-code was stripped in previous post. Verbose-option says it has found some img-tags that doesn’t link to images, which is wrong.
Image-tags/links that looks like this isn’t imported.
[a href="http://1.bp.blogspot.com/-sulz3okIDAE/TqMWM4XYQgI/AAAAAAAAAyI/-SL0Pe35Cn4/s1600/p1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"][img border="0" src="http://1.bp.blogspot.com/-sulz3okIDAE/TqMWM4XYQgI/AAAAAAAAAyI/-SL0Pe35Cn4/s1600/p1.jpg" /][/a]
March 30th, 2012 at 11:12 pm
[...] = {"data_track_clickback":true,"ui_language":"en"};Based on some new issues brought up by Morgan, I have simplified the regex for finding images (and I think removed a bug) and added [...]
April 14th, 2012 at 2:55 am
I have same problem as above ! Image not imported and no error.
How to solve this, I checked curl also it is installed.
April 14th, 2012 at 12:25 pm
I just wanted to tell you Thank YOU!! Your plug worked perfectly and saved me a lot of work!
May 8th, 2012 at 2:08 am
Hi,
I don’t know if it’s the right place to tell this, but the blogger-image-import
doesn’t work for me:
during the test phase, every links seems ok, but during
the import phase, it is stuck on the first post.
directories are created in wp-content/upload but nothing else…
any ideas?
May 15th, 2012 at 1:51 am
Thanks for a great plugin!
It _almost_ works for me. My problem is what Palpatine was experiencing – some of my images are old so there’s a 301 redirect happening that gets saved as an image instead of the real image. I tried editing the plugin to get Palpatines fix to work but my experience with php is too limited – I can’t find where to put the “get_final_url”-function that he linked to. Would anyone be willing to help?
Palpatine, would you be willing to post your modified file?
June 24th, 2012 at 8:52 am
[...] kan vinden want ik voel er weinig voor om alle afbeeldingen opnieuw manueel toe te voegen.(Later) Deze plugin zou me al een heel pak werk kunnen besparen.(Nog wat later) Damn! Dat importeren lijkt dus niet te [...]
June 26th, 2012 at 4:06 pm
Hi, thanks for this great plugin! I noticed that there is a part in the code for year-month-folders commented out. I would really like my photos imported in that kind of folder structure. Is there a way to make it work?
February 6th, 2013 at 12:50 pm
[...] can use a plugin like Blogger Image Import to import images directly into your WordPress installation, though at this time the author of [...]
February 16th, 2013 at 9:51 am
[...] came across a great plugin here that did just that, but unfortunately, it was a bit outdated and wasn't [...]
February 26th, 2013 at 8:16 am
Hi Notion,
I’ve taken the code from your blogger image import and merged it into the core blogger importer, I’ve made some tweeks and enhancements.
You can see the current beta at:
http://core.trac.wordpress.org/attachment/ticket/4010/blogger-importer.zip
Given that you’ve had some experience with this I’d be interested in your opinions and if you’ve got any test cases that it does not properly handle.
Cheers,
Andy
March 27th, 2013 at 11:35 am
Hey, great work! Just a problem: The wp-content directory and uploads directory can to be change.
I change the lines 35 and 36:
$dir = ABSPATH . ‘wp-content/uploads’;
$url = trailingslashit($siteurl) . ‘wp-content/uploads’;
By this:
$upload_dir = wp_upload_dir();
$dir = $upload_dir['basedir'];
$url = $upload_dir['baseurl'];
May 21st, 2013 at 11:38 pm
I recently had to convert a blog from Blogger to WordPress 3.1.1 and wanted to use this script because it appeared to do a neater job than Cache Images.
After a little searching and a little debugging, just a few simple changes were needed to make the script work.