WordPress: How to resize and cache images on the fly?
June 25, 2007 11:26 AM   Subscribe

WordpressFilter: I'd like to upload an image, resize it to 3 different sizes, cache the thumbnails, and grab the URL of the cached images using some kind of [?php thumb_1(); ?] or [?php thumb_2(); ?] template tag within the loop. Am I crazy?

This should be stupid-friendly. On the Write Post page, I should be able to just hit 'Browse' and select an image, and the resized versions should be available via the template tags. Each post will have just one corresponding image.

I'm new to PHP, but not afraid. I'm not familiar with Wordpress hooks, or writing plugins. Any tips? Any (non-)WordPress-specific solutions that I could adapt? What's the standard way of doing this?

With love,
a clueless designer.
posted by theiconoclast31 to Computers & Internet (3 answers total)
You're not crazy. Try imagecopyresized. Check out the other image functions too.
posted by sbutler at 12:07 PM on June 25, 2007

Wordpress is kind of stupid about this by default, only allowing one tiny unchangeable thumbnail size; otherwise leaving you to just drag-resize the full image in the rich WYSIWYG editor. Your best bet to get customizable image-resizing without hacking into the Wordpress core code is to check available image handling plugins here.
posted by brownpau at 1:49 PM on June 25, 2007

WARNING: Self Link
I've written Resize and Save for this purpose, in case anybody's interested.
posted by theiconoclast31 at 12:27 AM on July 4, 2007

« Older Can my computer upstairs power a monitor and...   |   More work = more money? Newer »
This thread is closed to new comments.