function image_path_flush in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/image/image.module \image_path_flush()
Clears cached versions of a specific file in all styles.
Parameters
$path: The Drupal file path to the original image.
2 calls to image_path_flush()
- image_file_move in core/
modules/ image/ image.module - Implements hook_file_move().
- image_file_predelete in core/
modules/ image/ image.module - Implements hook_ENTITY_TYPE_predelete() for file entities.
File
- core/
modules/ image/ image.module, line 215 - Exposes global functionality for creating image styles.
Code
function image_path_flush($path) {
$styles = ImageStyle::loadMultiple();
foreach ($styles as $style) {
$style
->flush($path);
}
}