Image thumbnails are broken, how do I regenerate them?
The only way to really regenerate them would be to manually re-insert the images.
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.
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.
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:
- names are now all lowercase (were mixed case before) – perhaps I need to change thumbnail URLs in the XML to all-lowercase as well
- 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.
Thumbnails are generated on this end, which is why the number is appended now.
Since only a few are pointing to the old location, it’s possible that they were missed when you made changes to the export file.
For now, I recommend just changing those manually.
I guess I did not explain things clearly enough; I’ll try again:
1) On import, all image filenames are changing: they are now lowercase (which is not a big deal as long as I know about it) and a number is appended (I am not referring to the -MxN suffix for thumnails here). For example, “Grilled-Salmon-with-Tarragon-5210.jpg” becomes “grilled-salmon-with-tarragon-52102.jpg”. Presumably the ‘2’ is added to avoid filename duplication, but this should not happen as the old content was completely removed, right? A test on a new wordpress.com site shows that this will not happen on the first import – is it possible to remove the blog completely and re-create it on the same URL? (the documentation indicates the URL would be lost, but I fail to see why that would happen)
2) Following on the example above, the file “grilled-salmon-with-tarragon-52102.jpg” can be accessed correctly (via its URLS); however, the expected thumbnail “grilled-salmon-with-tarragon-52102-300×205.jpg” cannot (404 file not found), so it seems the thumbnails are not being regenerated anyway. As a test, I also tried re-importing the fixed XML (where thumbnail URLs only were update with the new domain name, and filenames were converted to lowercase); the thumbnail URL is what it should be, but the file does not exist. This is a problem. If the import were to a wordpress.org site, suggestions on the web generally point to two options: a plugin that regenerates thumbnails, and uploading all wp-content/uploads to the new site (which is not an option on wordpress.com). This failure to handle thumbnails is a serious deficiency in the import code.
3) Please disregard what I said before about some href’s pointing to the old domain – when I refreshed the page after some time had passed, this did not reoccur.
The only option at this stage seems to involve re-adding all media manually to each post, which is a huge waste of time.
could you please (again) empty the blog of all content so I can re-import the material and start fixing thumbnails manually?
Is it possible for someone to empty the blog of all content so I can re-import the material and start fixing thumbnails manually?
Please disregard my earlier request to empty the blog. At this point I shall be closing this as resolved and will fix remaining issues manually.
The topic ‘Image thumbnails are broken, how do I regenerate them?’ is closed to new replies.