diff --git a/core/modules/image/image.install b/core/modules/image/image.install
index 735e007..5103f64 100644
--- a/core/modules/image/image.install
+++ b/core/modules/image/image.install
@@ -103,3 +103,101 @@ function image_requirements($phase) {
 
   return $requirements;
 }
+
+/*
+ * Load all the effects for an image style.
+ *
+ * Helper function for retrieving image effects from the image_effects database
+ * table for a given image style. This is a combination of the
+ * image_style_effects() and image_effects() functions from Drupal 7.
+ *
+ * @see image_update_8000()
+ */
+function _image_upgrade_style_effects($style) {
+  $effects = &drupal_static(__FUNCTION__);
+
+  if (!isset($effects)) {
+    $effects = array();
+
+    // Get image effects.
+    $result = db_select('image_effects', NULL, array('fetch' => PDO::FETCH_ASSOC))
+      ->fields('image_effects')
+      ->orderBy('image_effects.weight', 'ASC')
+      ->execute();
+    foreach ($result as $effect) {
+      $effect['data'] = unserialize($effect['data']);
+      $definition = image_effect_definition_load($effect['name']);
+      // Do not load image effects whose definition cannot be found.
+      if ($definition) {
+        $effect = array_merge($definition, $effect);
+        // Generate machine name for each effect.
+        $effect['ieid'] = $effect['name'];
+        foreach ($effect['data'] as $key => $value) {
+          $effect['ieid'] .= '_' . $value;
+        }
+        $effect['ieid'] = preg_replace('@[^a-zA-Z0-9_-]@', '', $effect['ieid']);
+        // Remove deprecated items from the effect.
+        $deprecated = array('effect callback', 'dimensions callback', 'form callback', 'summary theme', 'help', 'label', 'dimensions passthrough', 'module');
+        foreach ($effect as $key => $value) {
+          if (in_array($key, $deprecated)) {
+            unset($effect[$key]);
+          }
+        }
+        $effects[$effect['ieid']] = $effect;
+      }
+    }
+  }
+
+  $style_effects = array();
+  foreach ($effects as $effect) {
+    if ($style['isid'] == $effect['isid']) {
+      unset($effect['isid']);
+      $style_effects[$effect['ieid']] = $effect;
+    }
+  }
+
+  return $style_effects;
+}
+
+/**
+ * Convert existing image styles to the new config system.
+ */
+function image_update_8000() {
+  // Install default config for the image module
+  config_install_default_config('image');
+
+  // Get the image module-defined styles.
+  $styles = array();
+
+  // Get the user generated styles. If there are overrides of any of
+  // the image module's default styles, then they will overwrite the
+  // default style.
+  $user_styles = db_select('image_styles', NULL, array('fetch' => PDO::FETCH_ASSOC))
+    ->fields('image_styles')
+    ->orderBy('name')
+    ->execute()
+    ->fetchAllAssoc('name', PDO::FETCH_ASSOC);
+
+  foreach ($user_styles as $style_name => $style) {
+    $style['effects'] = _image_upgrade_style_effects($style);
+    if (isset($styles[$style_name]['module'])) {
+      $style['module'] = $styles[$style_name]['module'];
+    }
+    $styles[$style_name] = $style;
+  }
+
+  // Convert styles to the config system
+  foreach ($styles as $name => $style) {
+    $config = config('image.style.' . $name);
+
+    $config->set('name', $name);
+    if (isset($style['effects'])) {
+      $config->set('effects', $style['effects']);
+    }
+    else {
+      $config->set('effects', array());
+    }
+
+    $config->save();
+  }
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php
new file mode 100644
index 0000000..fa9fe41
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/ImageUpgradePathTest.php
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\system\Tests\Upgrade\ImageUpgradePathTest.
+ */
+
+namespace Drupal\system\Tests\Upgrade;
+
+/**
+ * Test upgrade of overridden and custom image styles.
+ */
+class ImageUpgradePathTest extends UpgradePathTestBase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Image upgrade test',
+      'description' => 'Upgrade tests for overridden and custom image styles.',
+      'group' => 'Upgrade path',
+    );
+  }
+
+  public function setUp() {
+    // Path to the database dump files.
+    $this->databaseDumpFiles = array(
+      drupal_get_path('module', 'system') . '/tests/upgrade/drupal-7.bare.standard_all.database.php.gz',
+      drupal_get_path('module', 'system') . '/tests/upgrade/drupal-7.image.database.php',
+    );
+    parent::setUp();
+  }
+
+  /**
+   * Tests that custom and overridden image styles have been upgraded.
+   */
+  public function testImageStyleUpgrade() {
+    $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
+
+    // Test that overridden and custom image styles are properly upgraded.
+    $styles = array(
+      'test-custom' => array(
+        'name' => 'test-custom',
+        'effects' => array(
+          'image_rotate_90_FFFFFF_1' => array(
+            'name' => 'image_rotate',
+            'data' => array(
+              'degrees' => '90',
+              'bgcolor' => '#FFFFFF',
+              'random' => '1',
+            ),
+            'ieid' => 'image_rotate_90_FFFFFF_1',
+            'weight' => '1',
+          ),
+          'image_desaturate' => array(
+            'name' => 'image_desaturate',
+            'data' => array(),
+            'ieid' => 'image_desaturate',
+            'weight' => '2',
+          ),
+        ),
+      ),
+      'thumbnail' => array(
+        'name' => 'thumbnail',
+        'effects' => array (
+          'image_scale_177_177_0' => array(
+            'name' => 'image_scale',
+            'data' => array (
+              'width' => '177',
+              'height' => '177',
+              'upscale' => '0',
+            ),
+            'ieid' => 'image_scale_177_177_0',
+            'weight' => '0',
+          ),
+        ),
+      ),
+    );
+
+    foreach ($styles as $name => $style) {
+      $config = config('image.style.' . $name)->get();
+      $this->assertEqual($style, $config, t('Upgraded image style %name successfully.', array('%name' => $name)));
+    }
+  }
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php
new file mode 100644
index 0000000..cab0b7f
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\system\Tests\Upgrade\SystemUpgradePathTest.
+ */
+
+namespace Drupal\system\Tests\Upgrade;
+
+/**
+ * Test upgrade of non-default values for system variables.
+ */
+class SystemUpgradePathTest extends UpgradePathTestBase {
+  public static function getInfo() {
+    return array(
+      'name' => 'System upgrade test',
+      'description' => 'Upgrade tests for non-default values of system variables.',
+      'group' => 'Upgrade path',
+    );
+  }
+
+  public function setUp() {
+    // Path to the database dump files.
+    $this->databaseDumpFiles = array(
+      drupal_get_path('module', 'system') . '/tests/upgrade/drupal-7.bare.standard_all.database.php.gz',
+      drupal_get_path('module', 'system') . '/tests/upgrade/drupal-7.system.database.php',
+    );
+    parent::setUp();
+  }
+
+  /**
+   * Tests that custom and overridden image styles have been upgraded.
+   */
+  public function testSystemVariableUpgrade() {
+    $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
+
+    // Test that the overridden values were properly converted.
+    $overrides = array(
+      'system.performance' => array(
+        'cache' => 1,
+        'page_cache_maximum_age' => '1800',
+        'page_compression' => 1,
+        'preprocess_css' => 1,
+        'preprocess_js' => 1,
+      ),
+    );
+    foreach ($overrides as $file => $values) {
+      $config = config($file);
+      foreach ($values as $name => $value) {
+        $stored = $config->get($name);
+        $this->assertEqual($value, $stored, t('Stored value %stored for %name matches old value %value.', array('%stored' => $stored, '%name' => $name, '%value' => $value)));
+      }
+    }
+  }
+}
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 088d464..e574c87 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1955,6 +1955,21 @@ function system_update_8012() {
 }
 
 /**
+ * Moves performance system settings from variable to config.
+ *
+ * @ingroup config_upgrade
+ */
+function system_update_8013() {
+  update_variables_to_config('system.performance', array(
+    'cache' => 'cache',
+    'page_cache_maximum_age' => 'page_cache_maximum_age',
+    'page_compression' => 'page_compression',
+    'preprocess_css' => 'preprocess_css',
+    'preprocess_js' => 'preprocess_js',
+  ));
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
diff --git a/core/modules/system/tests/upgrade/drupal-7.image.database.php b/core/modules/system/tests/upgrade/drupal-7.image.database.php
new file mode 100644
index 0000000..3cc99c0
--- /dev/null
+++ b/core/modules/system/tests/upgrade/drupal-7.image.database.php
@@ -0,0 +1,66 @@
+<?php
+
+/**
+ * @file
+ * Database additions for language tests. Used in upgrade.language.test.
+ *
+ * This dump only contains data and schema components relevant for language
+ * functionality. The drupal-7.filled.database.php file is imported before
+ * this dump, so the two form the database structure expected in tests
+ * altogether.
+ */
+
+// Add image effects.
+db_insert('image_effects')->fields(array(
+  'ieid',
+  'isid',
+  'weight',
+  'name',
+  'data',
+))
+->values(array(
+  'ieid' => '1',
+  'isid' => '1',
+  'weight' => '0',
+  'name' => 'image_scale',
+  'data' => 'a:3:{s:5:"width";s:3:"177";s:6:"height";s:3:"177";s:7:"upscale";i:0;}',
+))
+->values(array(
+  'ieid' => '2',
+  'isid' => '1',
+  'weight' => '2',
+  'name' => 'image_desaturate',
+  'data' => 'a:0:{}',
+))
+->values(array(
+  'ieid' => '3',
+  'isid' => '2',
+  'weight' => '1',
+  'name' => 'image_rotate',
+  'data' => 'a:3:{s:7:"degrees";s:2:"90";s:7:"bgcolor";s:7:"#FFFFFF";s:6:"random";i:1;}',
+))
+->values(array(
+  'ieid' => '4',
+  'isid' => '2',
+  'weight' => '2',
+  'name' => 'image_desaturate',
+  'data' => 'a:0:{}',
+))
+->execute();
+
+// Add image styles.
+db_insert('image_styles')->fields(array(
+  'isid',
+  'name',
+))
+// Custom style.
+->values(array(
+  'isid' => '2',
+  'name' => 'test-custom',
+))
+// Override thumbnail style.
+->values(array(
+  'isid' => '1',
+  'name' => 'thumbnail',
+))
+->execute();
diff --git a/core/modules/system/tests/upgrade/drupal-7.system.database.php b/core/modules/system/tests/upgrade/drupal-7.system.database.php
new file mode 100644
index 0000000..428f535
--- /dev/null
+++ b/core/modules/system/tests/upgrade/drupal-7.system.database.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Database additions for system tests. Used in upgrade.system.test.
+ *
+ * This dump only contains data and schema components relevant for system
+ * functionality. The drupal-7.filled.bare.php file is imported before
+ * this dump, so the two form the database structure expected in tests
+ * altogether.
+ */
+
+// Add non-default system settings.
+db_insert('variable')->fields(array(
+  'name',
+  'value',
+))
+->values(array(
+  'name' => 'cache',
+  'value'=> 'i:1;',
+))
+->values(array(
+    'name' => 'cache_lifetime',
+    'value' => 's:5:"10800";',
+  ))
+->values(array(
+    'name' => 'page_cache_maximum_age',
+    'value' => 's:4:"1800";',
+  ))
+->values(array(
+    'name' => 'page_compression',
+    'value' => 'i:1;',
+  ))
+->values(array(
+    'name' => 'preprocess_css',
+    'value' => 'i:1;',
+  ))
+->values(array(
+    'name' => 'preprocess_js',
+    'value' => 'i:1;',
+  ))
+->execute();
