WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a post here:


Where the image is overlapping the sidebar. I wish to shrink the image, but I want something that will do this without me editing the post (why? because the author is not me - and I want an automated system)

Is there a plugin or a CSS solution that can do this? (as cross browser as possible?)

share|improve this question
up vote 2 down vote accepted

Quick fix via CSS would be using max-width property to style images inside posts. Unfortunately it is very unreliable in Internet Explorer.

.entry img { max-width:500px !important; }

Also in your specific case image has size defined with inline style and it interferes.

Plugin method would involve scanning and changing posts content on the fly, which would probably bring in performance issues, etc.

In my opinion it is better to fix such things consistently on content level. If you have no authority to edit posts show the issue to person who has.

share|improve this answer
Thank you Rarst. I used it and it works (at least for chrome). I understand your suggestion but in this particular case this is not applicable. Thanks again! Tal – Tal Galili Sep 13 '10 at 14:21
Hello Rarst - for some reason this doesn't work for me here: food101.co.il/?p=6042 – Tal Galili Sep 15 '10 at 16:14

You could try adding $GLOBALS['content_width'] = 500; to your theme's functions.php file.

share|improve this answer

Have a look at Ajax Thumbnail Rebuild plugin. Once you re-specify the maximum image width size default under Settings > Media, this plugin will regenerate the thumbnails when the page is loaded.

share|improve this answer
img {max-width:98%; height: auto;}

use this in your stylesheet.

share|improve this answer

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.