I recently imported posts from another WP install, and everything seemed to go smoothly – except in specific cases where images are placed into a Post with the dimensions in the url.
For example…we have a full-size image on the server called “lindsay-wedding.jpg”. The imported post, however, uses “lindsay-wedding-300×255.jpg” (which doesn’t exist on the server).
I am assuming that WP takes the additional parameters at the end of the file name to automatically resize the image…but, in this case, it is simply showing a broken image…as if nothing exists there.
I don’t remember this being an issue before the switch…
Things that I’m wondering:
I am assuming that WP takes the additional parameters at the end of
the file name to automatically resize the image…
WordPress adds those suffixes when it creates the images, which is typically done on image upload. Those images should be on the server. By default (and if I am not mistaken), WordPress does not do any dynamic image resizing on page load the way some scripts do.
It sounds to me like you need to regenerate your thumbnails.
I haven’t used it but there is a plugin named for the task– Regenerate Thumbnails. There are also a considerable number of questions on this site concerning regenerating thumbnails that might help.
Manually transferring your files, as already suggested (and which answer I upvoted), should help. In fact, I would expect that to fix the problem entirely. If however, your new site is using different image dimensions than the first– for example, you switched themes or changed the settings– this probably would not work. So check your setting at
wp-admin->Settings->Media and if you have changed themes it is possible that one theme or the other alter the thumbnail dimensions. Check that too. In that case you’d need to regenerate the thumbnails for the new site anyway.
WordPress creates new images when
add_image_size() is used. When it does, it appends the file URL with the size. If you have access to the uploads folder on both servers, you may need to manually transfer the files from your old one to your new.