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