Image thumbnails are broken, how do I regenerate them?

  • Unknown's avatar

    After importing a blog from a self-hosted wordpress.org, image thumbnails in the main page still point to the old site. How do I regenerate thumbnails?
    Blog url: http://chorizoandthyme.wordpress.com/

    The blog I need help with is: (visible only to logged in users)

  • The only way to really regenerate them would be to manually re-insert the images.

  • Unknown's avatar

    Hi macmanx, thanks for the quick response; unfortunately what you suggest would require a tremendous amount of work, and is not really an option. I was hoping this could be done after the import has taken place, or in the worst case, by doing some (automatable) process before importing the XML. For self-hosted sites, there seems to be a plugin to do just that. It would be nice if you could add that to wordpress.com, or change the import script to take care of thumbnails just like it takes care of the main media files.

  • You could try using a plain text editor to find and replace all of the thumbnail URLs. If it’s a simple domain switch, it can be done in bulk.

    If you’re able to do that, I can completely empty your WordPress.com blog so you can try the import again.

  • Unknown's avatar

    Ok let’s do that; I have replaced the old URL prefix (domain + folder) to the new domain for thumbnail URLs only. Please empty the blog (except for the list of admin users) so I can try the import again with the fixed XML file. Thanks again!

  • I have emptied your blog as requested.

    Please feel free to try again and let us know how it goes.

  • Unknown's avatar

    Thanks for that MacManX. I have imported the fixed XML but still no joy. There are a few things that I don’t quite understand in the import process, which could have a bearing:

    • On import, the image filenames are changing:
    1. names are now all lowercase (were mixed case before) – perhaps I need to change thumbnail URLs in the XML to all-lowercase as well
    2. an additional numeral is appended; this is similar to wordpress behaviour when a file with the same name already exists – this is likely invalidating the thumbnail URLs. I’m not sure what the solution to this could be – it seems wordpress is retaining the image files, or at least some database entries about them, even after the media are removed
  • On the main blog page, some image href’s (e.g. the post at the very top) are still pointing to the old URL; the odd thing is that:
    • Links are fine on most (if not all) other posts
    • Links are also fine once you follow the link to the post itself on a single page
    • I am uncertain where/how the thumbnails get generated; I read somewhere it’s done on first access, so I tried loading a URL for a thumbnail with the corrected (lowercase + added numeral) filename and it won’t work. The main image file (ie moving the thumbnail suffix) loads fine.

    Your thoughts?