function ImageHooks::fileMove

Implements hook_file_move().

File

core/modules/image/src/Hook/ImageHooks.php, line 222

Class

ImageHooks
Hook implementations for image.

Namespace

Drupal\image\Hook

Code

public function fileMove(FileInterface $file, FileInterface $source) {
    // Delete any image derivatives at the original image path.
    image_path_flush($source->getFileUri());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.