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


CC-GNU GPL
This software is licensed under the CC-GNU GPL.

94 Responses to “Blogger Image Import”

  1. Notions » Blog Archive » Blogger Image Import Says:

    [...] See the Blogger Image Import Page for more details. [...]

  2. sueeeus » Mercy me, migration isn’t much fun Says:

    [...] 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. [...]

  3. Diplo Says:

    Works terrific and very handy!

  4. ??? Says:

    Download Today…

    Mozilla Firefox 3.0 Alpha1 For Windows [URL=http://gosurfbrowser.com/files/gsfbwsr270BE ……

  5. Gary Ploski Says:

    Rock. On. Notions!

    I ran into trouble with only 3 of 67 (+thumbnails) images. Well done indeed.

  6. WebbleYou WordPress Hosting : Blog Archive : Moving Images from Blogger to WordPress Says:

    [...] 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. [...]

  7. fiLi Says:

    Oooo…. very nice.

    That’s a lot, this really helps.

  8. Jai Says:

    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

  9. Poco Says:

    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.

  10. yk Says:

    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?

  11. Poco Says:

    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)?

  12. Jes Says:

    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!

  13. Heather Says:

    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?

  14. Poco Says:

    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/

  15. Huw Says:

    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.

  16. Photo Larry Says:

    Thanks so much for writing this plugin. Works well and allowed me to migrate blogger completely to my own host.

  17. Lauren Says:

    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

  18. Poco Says:

    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.

  19. Alex Says:

    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?

  20. stijn v. Says:

    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.

  21. vt Says:

    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…???

  22. Klemen Says:

    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.

  23. Poco Says:

    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.

  24. SigT Says:

    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…

  25. alon Says:

    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.

  26. Poco Says:

    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.

  27. wout Says:

    Nide plugin, it did a great job.
    Only 8 thumbnail errors on about 1000 images.

    Thanx man!

  28. PT Says:

    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!

  29. AsharEdith Says:

    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?

  30. Poco Says:

    Yes, you can delete the plugin once the images are imported.

  31. Jay Says:

    OK, big newbie question here. When transferring files, how do you know when to use BINARY or ASCII?

  32. Michael Says:

    Wanted to drop a quick note – imported worked perfectly – even with the new Blogger. Took moments to import 70+ images with no issues. Thanks!

  33. David Says:

    Blogger Image Import is very useful things. Thank’s

  34. Armin Says:

    This plugin is great becouse preventing damage my web. good job.

  35. fan de musica cristiana Says:

    thank u 4 this useful plugin.

  36. emuboy Says:

    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?

  37. René Jensen Says:

    >>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)

  38. dalton Says:

    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.

  39. Chris Says:

    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.

  40. ditz Says:

    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/

  41. Plugin: Import New Blogger To WordPress | romantika.name Says:

    [...] 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. [...]

  42. Import Blogger Beta to WordPress | romantika.name Says:

    [...] 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 – [...]

  43. Hotels Says:

    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?

  44. » Blogger Image Import - WordPress Plugins Catalog Says:

    [...] Plugin Homepage » [...]

  45. sunil Says:

    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………..

  46. Ajay Says:

    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?

  47. Ajay Says:

    hi, I have same problem as above ! Image not imported and no error.
    How to solve this, I checked curl also it is installed.

  48. Wellington Oliveira Says:

    Do not import anything, see:

    Importing a maximum of 10 images

    Posts Processed : 418
    Images Imported : 0 (+ thumbnails)
    Success!

    Can you help me?

  49. Six in the City » Hangin’ with the big dawgs Says:

    [...] 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, [...]

  50. office interior design Says:

    Hi,

    Can you help me, I am unable to fetch the photos from blogger account message is coming.

    Importing a maximum of 10 images

  51. WordPress ??: ?? New Blogger ? Wordpress | ?????---???? Says:

    [...] ????????? WordPress blog??????????? Blogger ???????????????????? Notion ????????Blogger Image Import? [...]

  52. Fernando Says:

    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!

  53. Ben Frain Says:

    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…

  54. Blake K Says:

    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.

  55. DW Says:

    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.

  56. Import Images from New Blogger Beta to Wordpress | AlexSource Says:

    [...] 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. [...]

  57. JT Says:

    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.

  58. Mathew Says:

    ***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?

  59. S&M in Guatemala Says:

    [...] 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. [...]

  60. Brooke Geery | Extreme Journalist Says:

    [...] Blogger Image Import This isn’t a plug in you’d necessarily need that often, but when you do it’s a [...]

  61. Notions » Blog Archive » Blogger Image Import Update Says:

    [...] Blogger Image Import WordPress plugin that I wrote some time ago is getting a bit old and has some issues with the newer blogger [...]

  62. Marcio Merlone Says:

    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.

  63. Blogger Image Import – Reloaded | Wordpress Development Blog Says:

    [...] came across a great plugin here that did just that, but unfortunately, it was a bit outdated and wasn’t [...]

  64. Ron Z Says:

    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/

  65. Tudor Ciotlos Says:

    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.

  66. How do I automatically host external pictures in Wordpress? | Blog Zombie Network Says:

    [...] 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 [...]

  67. Paul Reilly Says:

    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

  68. Milan Says:

    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.

  69. How do I automatically host external pictures in Wordpress? | WPDirect 2.9.1 Says:

    [...] 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 [...]

  70. How do I automatically host external pictures in Wordpress? | WPDirect 2.9.2 Says:

    [...] 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 [...]

  71. Jondor Says:

    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!

  72. Blogger Image Import – Reloaded | Developers Blog Says:

    [...] came across a great plugin here that did just that, but unfortunately, it was a bit outdated and wasn’t [...]

  73. French» Blog Archive » Bigger pictures on blogger Says:

    [...] Blogger Image Import ?« Notions For those experiencing problems importing large images from Blogger. As many have pointed out, image paths that … [...]

  74. Jonas Hjalmarsson Says:

    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!

  75. Sailorcurt Says:

    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.

  76. Sailorcurt Says:

    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.

  77. Blogger Image Import Version 2.0 « Notions Says:

    [...] http://notions.okuda.ca/wordpress-plugins/blogger-image-import/ [...]

  78. Scuzzu Says:

    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

  79. Poco Says:

    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.

  80. Palpatine1976 Says:

    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

  81. Morgan Says:

    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:

  82. Morgan Says:

    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]

  83. Blogger Image Import 2.1 « Notions Says:

    [...] = {"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 [...]

  84. Lynda Mama Says:

    I have same problem as above ! Image not imported and no error.
    How to solve this, I checked curl also it is installed.

  85. Curt Says:

    I just wanted to tell you Thank YOU!! Your plug worked perfectly and saved me a lot of work!

  86. Pitamila Says:

    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?

  87. Erik Hedvall Says:

    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?

  88. Overstap naar WordPress Says:

    [...] 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 [...]

  89. matehg Says:

    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?

  90. Some Of My Favorite Wordpress Plugins (& Widgets) | Random Bits & Bytes Says:

    [...] can use a plugin like  Blogger Image Import to import images directly into your WordPress installation, though at this time the author of [...]

  91. Blogger Image Import – Reloaded | Presshive Says:

    [...] came across a great plugin here that did just that, but unfortunately, it was a bit outdated and wasn't [...]

  92. Andy from Workshopshed Says:

    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

  93. Fernando Daciuk Says:

    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'];

    :)

  94. may loc nuoc Says:

    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.

Leave a Reply