Great observation Otto! :-)<div><br></div><div>I guess this solves an issue which was haunting me since long!</div><div>I use to manually set &quot;large&quot; size to my content-width and so I always needed to edit &quot;large&quot; size whenever post-content width changed with my theme! This used to create problems with old posts...</div>

<div><br></div><div>Still, rather than hard-coding height and width like </div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">width=&quot;640&quot; height=&quot;425&quot;</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">WordPress can &quot;push&quot; CSS like </span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><meta charset="utf-8">img.size-large {max-width: 640px}</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br>

</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">where max-width will be value of $</span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">content_width</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Using CSS based resizing may take care of change in </span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">$</span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">content_width whenever theme changes.</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Only thing CSS based height/width on image might have some glitches. As of now I remember only IE6&#39;s lack of support for max-width attribute. There may be more!</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Another positive side of CSS-based approach is, CSS will go inside RSS readers where post-content width may differ! It could be </span><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">negative side as well, depending on your perspective!</span></div>

<meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><meta charset="utf-8"><div><br></div><div>--<br>Rahul Bansal | Founder &amp; CEO | rtCamp Solutions Pvt. Ltd.<br>Skype: rahul286 | Twitter: @rahul286 | Web: <a href="http://rtcamp.com/" target="_blank">http://rtcamp.com/</a><br>

<br>
<br><br><div class="gmail_quote">On Tue, Feb 15, 2011 at 11:19 AM, Otto <span dir="ltr">&lt;<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Mon, Feb 14, 2011 at 11:16 PM, Philip M. Hofer (Frumph)<br>
&lt;<a href="mailto:philip@frumph.net">philip@frumph.net</a>&gt; wrote:<br>
&gt; Let me clarify, its usage is apparently inside the editor which makes no<br>
&gt; difference to how it is viewed in output to the end user.  Which makes the<br>
&gt; whole functionality of it not useful.<br>
<br>
</div>No, look... I know for a fact this works. I use it all the time. What<br>
you need to understand is how exactly it works...<br>
<br>
Firstly, it only applies to &quot;large&quot; images.<br>
<br>
So, when I upload an image, the image gets resized into thumbnail,<br>
medium, large, and &quot;full&quot; which is not really a resize at all. These<br>
get saved. The resize proportions used are user defined in the<br>
Settings. Those can be anything you like.<br>
<br>
The image_constrain_size_for_editor() function gets called when it&#39;s<br>
pulling image sizes to insert into a post. In the specific case where<br>
the &quot;large&quot; image is being inserted, and it&#39;s greater than the<br>
$content_width, then the large image will be inserted but it will get<br>
width and height properties on it scaled down to the $content_width<br>
size. Meaning that though the large size image is loading, the browser<br>
itself will do the scaling down of the image to fit within the post<br>
content area.<br>
<br>
Now, if your CSS is wonky, this might not always work. And different<br>
browsers behave differently. But the width and height still do get set<br>
in the image properly.<br>
<br>
It even works in twentyten. I just tried it. Bam, worked. The &quot;large&quot;<br>
size was set to 1024x1024, but what I see when I use the media<br>
uploader gives me a result like this:<br>
&lt;a href=&quot;<a href="http://localhost/wp/2011/01/image-test/mcm_6241/" target="_blank">http://localhost/wp/2011/01/image-test/mcm_6241/</a>&quot;<br>
rel=&quot;attachment wp-att-354&quot;&gt;&lt;img<br>
src=&quot;<a href="http://localhost/wp/wp-content/uploads/2011/01/MCM_6241-1024x681.jpg" target="_blank">http://localhost/wp/wp-content/uploads/2011/01/MCM_6241-1024x681.jpg</a>&quot;<br>
alt=&quot;&quot; title=&quot;MCM_6241&quot; width=&quot;640&quot; height=&quot;425&quot; class=&quot;alignleft<br>
size-large wp-image-354&quot; /&gt;&lt;/a&gt;<br>
<br>
Note two things there. The image is this:<br>
MCM_6241-1024x681.jpg<br>
<br>
But the image tag contains this:<br>
width=&quot;640&quot; height=&quot;425&quot;<br>
<br>
This is because twentyten has its $content_width set to 640. Really.<br>
<div><div></div><div class="h5"><br>
-Otto<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br></div>