1

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-300x255.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:

  • do i need to somehow update the rewrite?
  • is there a WP setting that I am missing?
  • if none of the above, do i need to manually adjust every single image?
4

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.

3

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.

2
  • thanks for the answer - actually I did try that...interestingly, it helped with some of the files, and not others. does WP ever do anything dynamic? – johnnietheblack May 7 '13 at 18:01
  • No problem. The import/export function is a little tricky. In doing a little bit of research I found: WordPress.org installation gives you the option to import uploaded files, but the blog you are importing from must be live and serving images properly in order for it to work. So, do not delete your blog until after media files have successfully been imported into the new blog – Bryan Monzon May 7 '13 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.