Same name and namespace in other branches
  1. 7.x modules/image/image.install \image_install()
  2. 8.9.x core/modules/image/image.install \image_install()
  3. 9 core/modules/image/image.install \image_install()

Implements hook_install().

File

core/modules/image/image.install, line 14
Install, update and uninstall functions for the image module.

Code

function image_install() {

  // Create the styles directory and ensure it's writable.
  $directory = \Drupal::config('system.file')
    ->get('default_scheme') . '://styles';
  \Drupal::service('file_system')
    ->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
}