Can I get a function that can be called from themes and modules to automatically file_copy() images outside of the file_directory_path() into the files directory so that imagecache can then render a preset for them? This has come up for me a couple times while developing themes and modules and would be nice. (e.g. flashvideo.module provides a video_MIA.png image that appears when no other thumbnail can be displayed, but the image is located inside the drupal_get_path('module', 'flashvideo') directory, which means I can't use imagecache to resize it to various presets without making a copy and moving it into the files directory first).

I'm thinking something like:

function theme('imagecache', $preset, $image->filepath, $copy_if_necessary = TRUE);

Comments

kecinzer’s picture

I would like this function too.

dopry’s picture

Status: Active » Closed (fixed)

ImageCache 2.x already supports creating presets for files outside of the file_directory_path.