[wp-hackers] Twenty Ten theme issue?

Nathaniel Taintor goldenapplesdesign at gmail.com
Mon Aug 16 20:02:11 UTC 2010


WP does perform actual resizing of images... check your uploads folder, for
most images uploaded, there are three or four resized images saved...
'thumbnail', "small", "medium", "large", and "original" by default, although
you can add more image sizes through theme or plugin functions.

I've often added custom image sizes through my functions.php like this:

add_image_size('new-custom-size', 400,9999); // resize to 400px wide, for
example...

and then specified the size in my style:

img.size-new-custom-size { width: 400px; }

thinking it would give me slightly quicker page rendering.

Are you saying that's not correct? The only issue I can see is if the
original uploaded image was smaller than that size, but in that case - from
what I understand, the custom size isn't created in the first place and that
class won't be used.

Best,
Than


From: Chip Bennett <chip at chipbennett.net>
> Subject: Re: [wp-hackers] Twenty Ten theme issue?
>
> Wouldn't the correct long-term solution be to have WP perform *actual*
> resizing of images, such that each image had Original, Thumbnail, Small,
> Medium, and Large instances (a la Flickr)?
>
> Chip
>
> On Mon, Aug 16, 2010 at 10:23 AM, Otto <otto at ottodestruct.com> wrote:
>
> > On Mon, Aug 16, 2010 at 5:33 AM, Rich Pedley <elfin at elfden.co.uk> wrote:
> > > But there is also a case for the width and height attributes on the img
> > > (isn't it still recommended?).
> >
> > It's recommended to have them in order to give browsers a hint as to
> > their size for layout, but it's still wrong to use them for resizing.
> >
> > Yes, yes, lots of people use it that way. Still wrong because CSS
> > takes precedence over those attributes. We should fix WP to do the
> > right thing here, I'd say. Should be simple enough to do, really.
> >
> > -Otto
> >
>


More information about the wp-hackers mailing list