You are here

function imagecache_get_images_in_node in ImageCache 6.2

Given a node, get all images associated with it.

Currently this only works with images stored in filefields.

Parameters

$node: Node object.

Return value

An array of info from the files table.

3 calls to imagecache_get_images_in_node()
imagecache_flush_action in ./imagecache.module
Flush all imagecache presets for a given node.
imagecache_generate_action in ./imagecache.module
Generate imagecache presets for the given node and presets.
imagecache_generate_all_action in ./imagecache.module
Generate all imagecache presets for the given node.

File

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

Code

function imagecache_get_images_in_node(&$node) {
  $files = array();
  if (module_exists('filefield')) {
    $data = filefield_get_node_files($node);
    foreach ($data as $key => $value) {
      if (stristr($value['filemime'], 'image')) {
        $files[$key] = $value;
      }
    }
  }
  return $files;
}