How can you make imagecache play nicely with a site that supports multiple themes?
An imagecache preset typically includes a 'scale and crop' action to resize an image so that it fits nicely in the site's theme. Often, the themes custom node templates will reference imagecache pesets by name.
So, if you wanted your site to support 2 quite different themes, where the images need to be displayed at different sizes depending on the themes, what would be the best / most appropriate way of doing this?
As far as I can see, the options are:
1) Define 2 copies of each style (where the name of the style is prefixed with the name of the theme so it's easy to identify which preset goes with which theme). So you might have theme1_thumbnail and theme2_thumbnail. Then, the theme can use the appropriate one in it's templates (theme('imagescache', 'theme1_thumbnail' ...). Whilst this is easy to do it just feels wrong to load up the database with theme specific Imagecache presets.
2) Create the imagecache presets on the fly in the theme layer somewhere - but I'm not sure if this is possible or how you would do it. Also, it feels a bit overkill and again, like the wrong approach.
3) Override the imagecache presets in you're template.php file for each theme - this seems like it would be a good approach, but again I have no idea if it's possible of how you would do it. Does Imagecache provide any kind of preprocess function to allow for this?
Any ideas or other suggestions?!
ps. I did just post this as a support request in the ImageCache queue (http://drupal.org/node/714962) but I though that the people in this group might have some insights, and that if I do get an answer be it from here or from the other issue, this seems like a good place to have it kept for reference!