function image_uninstall
Implements hook_uninstall().
File
- 
              core/
modules/ image/ image.install, line 23  
Code
function image_uninstall() {
  // Remove the styles directory and generated images.
  /** @var \Drupal\Core\File\FileSystemInterface $file_system */
  $file_system = \Drupal::service('file_system');
  try {
    $file_system->deleteRecursive(\Drupal::config('system.file')->get('default_scheme') . '://styles');
  } catch (FileException $e) {
    // Ignore failed deletes.
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.