[wp-hackers] Twenty Ten theme issue?

Chip Bennett chip at chipbennett.net
Tue Aug 17 02:15:45 UTC 2010


Well, that's what I always *assumed* that WordPress did (actual resizing) -
but then this thread made me doubt that assumption.

If actual resized images exist, why on earth would WordPress then be
performing additional, rendered resizing via IMG attributes? (Perhaps when
the advanced-option resizing is performed for an inserted image?)

Chip

On Mon, Aug 16, 2010 at 3:02 PM, Nathaniel Taintor <
goldenapplesdesign at gmail.com> wrote:

> 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
> > >
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list