I’ve been trying to figure out how to better manage images… Riding BART today I realized that I should just do what I’ve been meaning to do all along: integrate the “post” and “upload” functions of WordPress, and create an asset (”post”) for each image. This allows you to store meta-data (title, description, categories or “tags”, url, size, etc.) in the usual wordpress places. I use a couple of post meta data fields for the url of the image and thumbnail, and automatically push “image” onto the list of categories as appropriate. Here’s my version of post.php, in case you’d like to check it out.
With each image is set up as it’s own post, I then reference the image posts within a “normal” textual post, using a plugin to expand the post ID of the image post into HTML that displays the thumbnail and a link to the full image. Since this is done in a plugin, I can maintain this HTML in one central place. My “expand image asset” tag looks like :POSTID->METHOD:, e.g. :233->all: or :210->subject: and the plugin uses get_postdata to retrieve the details of the image asset post — it’s pretty clean. Here’s the plugin itself, in case you’re interested.
To do:
- create full image display page with title, desc, tags, etc. (done)
- create asset posts for moblog images (done)
- allow comments in image HTML displayed within main post (done)
- re-enable categories (tags) (done)
- sync tag nav with del.icio.us tags. (done)
- export and upload image asset posts from iMatch to WordPress(done)
- display image assets in archive view (done)
- add gallery-style display option (done)
- add image thumbnails to edit.php display if in_category(IMAGE), so that it’s easier to browse image assets and include references in main posts (done)
- switch “Category” UI to “tag” UI, probably using Kellan’s code
- UI to upload multiple images (with tags) (ignore - maintain data in iMatch)
- UI to maintain tags and subjects of multiple images (ignore - maintain data in iMatch)
Why not use Flickr? One certainly could do the same plugin trick and expand Flickr image ID’s into a chunk of HTML suitable for displaying within the blog. You could also do the tag-browsing thing with Flickr… and they have some nice features and UI (including most of the above). However (for now at least):
- extra cost (not sure how much a Pro account will be going forwards, and I’m already paying for hosting)
- exercise my rusty programming skills
Other blogs commenting on this post –



October 4th, 2004 at 5:08 pm
[...] to WordPress export working Oct 04 iMatch to WordPress export working I wrote a while back about my thinking a [...]
December 10th, 2005 at 10:06 pm
So people will can add images to comments on my web sites, like for an used tractors web sites announces?