Best solution to provide imagecache support for Brightcove module?

We are in the middle of our development cycle doing a Brightcove module for Drupal and we are currently discussing following issue: The module would be even cooler if it provides Imagecache support for thumbnails and still images coming from Brightcove Media API (still images are single frames from the video).

Any imagecache support is very easy, it's a matter of creating a simple formatter and a field in Views. Keeping that in mind, situation gets much more complicated when you have to do this with external images - our Video thumbnails are sourced from Brightcove and Imagecache module does not support external images. You cannot do something like this:

$image = theme('imagecache', 'some_preset', 'http://www.dynamiteheads.com/file.jpg');

In order to do that, you have to download the image to files/ directory first, then point imagecache to it.

There is even a bigger problem - what if the image changes? We should be able to detect a filename change and reload the image but it requires more checks and might be a performance hit.

What is your opinion about this? Give us your ideas, we are very happy to listen to Drupal community!

Jakub Suchý

Jakub is owner and founder of Dynamite Heads. Jakub is a member of Drupal Security Team and supports Czech Drupal community at Drupal.cz