[wp-hackers] Inclusion of TimThumb -- anyone game?

Mike Schinkel mikeschinkel at newclarity.net
Thu Mar 5 20:04:03 GMT 2009


"Casey Bisson" <casey.bisson at gmail.com>
> What's needed for that is for WP to have a function like 
> the_icon() or the_image() that works like the_content() 
> and and the_title(). The question, however, is how to set 
> that image when creating posts.

I strongly agree with this. And even if it gets voted down for core I'd like to see those of us who see the need collaborate on a plugin that can be considered the default for such functionality.

As I see it we'd need something like this (I present these as a starting point for discussion):

the_image([$args]) where $args could include at least:

'size' => '{width}x{height}' (i.e. 300x250) or a named size, i.e. 'main', 'tall', 'wide', 'sidebar_thumb' etc. where there would only be one "reserved"  named size (i.e. 'original'?) which would be the default when not specified, and the rest would be configurable in wp_options.

'imagenum' => 0 by default where 0 is the first (and possibly only) image which means we'd need a image_count() function.

A very important component of this is how to store this information in wp_postmeta and elsewhere.  

If we do this it can become a building block for a lot of plugins (including my image cropper plugin that I've not yet released.) That would IMO be the most important reason to do this.

-Mike Schinkel
http://mikeschinkel.com/


More information about the wp-hackers mailing list