I am migrating domains and redesigning the site at the same time. My large image sizes are different than they were before. When I imported the old posts, I had it download all the images as well. My problem is that the images that were inserted with the old file size name. Is there a way to replace all of the images with the correct new image sizes? I just want it to use the default 'large' size, even though it is different than the original site.

In post html:

Actual image sizes:

1 Answer 1


Use plugin Regenerate Thumbnails to resize thumbnails.


Try use filter "the_content" to convert in post content.


function foo ( $content )
    return preg_replace ('/540x287/', '525x279', $content);

add_filter( 'the_content', 'foo' )

Filter "the_excerpt" if need convert excerpt too.

  • That's not the problem. I want to use my new 'large' size instead of the old sizing. It's not a question of having the right sized images, it's a question of having the html in all my posts pointing to the old size. Mar 14, 2011 at 18:02
  • I add solution.
    – Marcin
    Mar 14, 2011 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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