You are here

function imagecache_generate_all_action in ImageCache 6.2

Generate all imagecache presets for the given node.

Parameters

$node: A node object.

$context: Contains values from the calling action.

See also

imagecache_action_info()

File

./imagecache.module, line 1263
Dynamic image resizer and image cacher.

Code

function imagecache_generate_all_action(&$node, $context) {
  $files = imagecache_get_images_in_node($node);
  $presets = imagecache_presets();
  if (!empty($files) && !empty($presets)) {
    foreach ($files as $file) {
      foreach ($presets as $presetname) {
        imagecache_generate_image($presetname['presetname'], $file['filepath']);
      }
    }
  }
}