Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have just changed the theme on my blog, and because of a small page width, it breaks the layout. Most of my earlier images (attached in posts) are around 600px in width, and now I need to resize all of them them proportionately to 450px. How do I resize them all at one shot? Is there a plugin for this?

P.S.: Writing a CSS rule is a good option, and I've already done that. But I figure resizing the images would also knock off the download overhead for each page!

share|improve this question
Do you have shell access to the server? –  Raphael Dec 7 '10 at 12:26
Are those images thumbnails or are these the original images? –  hakre Dec 7 '10 at 12:40
@Raphael: Yeah I do have shell acess –  GPX Dec 7 '10 at 13:55
@hakre: I want to resize the original images –  GPX Dec 7 '10 at 13:55
keep a backup of the bigger size images, in case u change the theme later and need larger images- just a tip –  mireille raad Dec 10 '10 at 23:02

3 Answers 3

up vote 4 down vote accepted

I asked a similar but broader question, and I still need to research and write a complete answer. In the meantime here are some pointers that might help you:

I wrote a set of plugins that resizes all images to the size used in the editor. It works by converting <img src="image.jpg" width="200" height="400"/> to <img src="image-200x400.jpg" width="200" height="400"/> (Resize img tags) and catching and generating those missing intermediate sizes on request (On-Demand Resizer). You should be able to do the first part in bulk, and then let the second plugin handle the new images. It also works with partial information: image-200x.jpg will return a proportionally-resized image 200 pixels wide.

Regenerate Thumbnails indeed re-creates images at different sizes, but I don't think it also updates your post content to refer to these images? Even worse, if it deletes the old intermediate sizes, your post will still reference the now non-existing image-600x400.jpg instead of image-450x300.jpg.

share|improve this answer

Log in to your server and go to the root directory of your wordpress. Then execute:

cd wp-content/uploads/;
for img in `find . -name *.jpg -printf '%p\n'`
  mogrify -resize "450>x" $img;

This will resize every JPG in your upload folder (and all subfolders!) that are wider than 450px to this width proportionally. If you have PNG, GIF, ... just rerun with the respective file ending.

I assume that you use the standard upload folder (adapt first line otherwise) and that your server has imagemagick installed.

No warranty, of course.

share|improve this answer

Try the plugin 'Regenerate Thumbnails', it does just what you're looking for.


share|improve this answer
Does it resize the original image too? I thought it only resizes the WordPress-generated thumbnails! –  GPX Dec 7 '10 at 14:00
It actually resizes to new dimensions listed in media settings. It does not resize the original on the small, med, large, and thumbnail. –  Chris_O Dec 8 '10 at 18:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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