You are here

function imagecache_image_flush in ImageCache 5

Same name and namespace in other branches
  1. 5.2 imagecache.module \imagecache_image_flush()
  2. 6.2 imagecache.module \imagecache_image_flush()

Clear cached versions of a specific file in all presets.

Parameters

$path: The Drupal file path to the original image.

File

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

Code

function imagecache_image_flush($path) {
  $presets = _imagecache_get_presets();
  foreach ($presets as $presetid => $presetname) {
    $ipath = file_directory_path() . '/imagecache/' . $presetname . '/' . $path;
    file_delete($ipath);
  }
}