Overriding Imagecache Thumbnails

Posts: 34
Joined: 02/04/2008

Hi Guys,
I was wondering just how easy it would be to allow for an admin to provide custom thumbnails for products. In my experience the quality of the GD2 thumbnails is pretty damn good, but I have a client who is a bit of a photographer and I get the feeling he's quite intent on providing his own thumbnails.

Would providing manually resized images be a case of dumping them in imagecache\thumbnail\files with the same filename as an existing image? If that's the case, then what about when/if the imagecache is flushed for that image size?

Anyone got any idea how hard this would be to do?

Cheers,
Toby

Posts: 2352
Joined: 08/07/2007
AdministratoreLiTe!

Dropping the pre-sized thumbnails into imagecache's folder would probably work really well. Those images are only flushed if someone clicks the Flush Presets button in the imagecache settings. Since someone will do that evenatually, I'd keep a copy of those thumbnails somewhere else. Though, when it happens, it'll probably take a while for anyone to notice.

Posts: 34
Joined: 02/04/2008

Cheers Lyle, seems like a suitably simple option.

Posts: 20
Joined: 02/09/2008

If the artist could settle for either a scaled or cropped version of the images(or both), then you could add a new imagecache preset, maybe use the views bonus pack and build a block of thumbnails. Then go and use this to quickly show your client how the generated thumbnails will look. You might have to tweak the number of cells in the grid view but thats all documented well.

Of course if he needs completely different images for the thumbnails and a watermark wouldn't cut it then I don't know what I'm talking about. I think you can adjust watermark transparency pretty easily.

There's 2 examples (imagecache presets and views) over here: http://rossignol.dreamhosters.com/catalog

-TH