Implements hook_config_import_change().
function image_config_import_change($name, $new_config, $old_config) {
// Only image styles require custom handling. Any other module settings can be
// synchronized directly.
if (strpos($name, 'image.style.') !== 0) {
return FALSE;
}
list(, , $id) = explode('.', $name);
$style = entity_load('image_style', $id);
$style->original = clone $style;
foreach ($old_config
->get() as $property => $value) {
$style->original->{$property} = $value;
}
foreach ($new_config
->get() as $property => $value) {
$style->{$property} = $value;
}
$style
->save();
return TRUE;
}