[thelist] image thumbnails: dynamic resizing or something else

Aredridel aredridel at nbtsc.org
Fri Jul 11 09:28:40 CDT 2003


> can you guys suggest something else? maybe something
> like creating a thumbnail on the backend and storing
> it as a separate file? i am using Java, btw.


In PHP, I do that.  I use the PHP-imagick extension to manipulate the
images, and I have a script that will send either a nicely-sized
"fullsize" (often actually scaled down) or a thumbnail, based on a
parameter.  When my CPU load gets high, I'll add a simple cache for the
thumbnail versions -- 

if(filemtime("cache/$filename") < filemtime("images/$filename")) {
	make_thumbnail();
} else {
	read_cached_file_and_send();
}

Ari



More information about the thelist mailing list