function image_install

Same name in other branches
  1. 7.x modules/image/image.install \image_install()
  2. 9 core/modules/image/image.install \image_install()
  3. 10 core/modules/image/image.install \image_install()
  4. 11.x core/modules/image/image.install \image_install()

Implements hook_install().

File

core/modules/image/image.install, line 14

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);
}

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