image_path_flush

Versions
mediamosa-21
image_path_flush($path)

Clear cached versions of a specific file in all styles.

Parameters

$path The Drupal file path to the original image.

Code

modules/image/image.module, line 361

<?php
function image_path_flush($path) {
  $styles = image_styles();
  foreach ($styles as $style) {
    $path = image_style_path($style['name'], $path);
    if (file_exists($path)) {
      file_unmanaged_delete($path);
    }
  }
}
?>