1 image.install image_update_1005()

Rename image config files.

Related topics

File

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

Code

function image_update_1005() {
  $config_names = config_get_names_with_prefix('image.styles.');
  foreach ($config_names as $config_name) {
    $old_config = config($config_name);
    $new_config = config(str_replace('image.styles.', 'image.style.', $config_name));
    $new_config->setData($old_config->get());
    $new_config->save();
    $old_config->delete();
  }
}