diff --git a/imagecache.module b/imagecache.module
index 55d48ce..e3b8bee 100644
--- a/imagecache.module
+++ b/imagecache.module
@@ -53,7 +53,7 @@ define('IMAGECACHE_STORAGE_OVERRIDE', 2);
  * Implementation of hook_perm().
  */
 function imagecache_perm() {
-  $perms =  array('administer imagecache', 'flush imagecache');
+  $perms =  array('administer imagecache', 'flush imagecache', 'import imagecache preset');
   foreach (imagecache_presets() as $preset) {
     $perms[] =  'view imagecache '. $preset['presetname'];
   }
diff --git a/imagecache_ui.module b/imagecache_ui.module
index bc611b4..cdf5f4f 100644
--- a/imagecache_ui.module
+++ b/imagecache_ui.module
@@ -119,6 +119,14 @@ function imagecache_ui_menu() {
     'access arguments' => array('administer imagecache'),
     'type' => MENU_CALLBACK,
   );
+  $items['admin/build/imagecache/import'] = array(
+    'title' => 'Import new preset',
+    'file' => 'imagecache_ui.pages.inc',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('imagecache_ui_preset_import_form'),
+    'access arguments' => array('import imagecache preset'),
+    'type' => MENU_LOCAL_TASK,
+  );
   return $items;
 }
 
diff --git a/imagecache_ui.pages.inc b/imagecache_ui.pages.inc
index 2b1c6d1..d5e3609 100644
--- a/imagecache_ui.pages.inc
+++ b/imagecache_ui.pages.inc
@@ -112,9 +112,7 @@ function imagecache_ui_preset_export_form(&$form_state, $preset = array()) {
     unset($preset['actions'][$id]['actionid']);
     unset($preset['actions'][$id]['presetid']);
   }
-  $exported = '$presets = array();';
-  $exported .= "\n";
-  $exported .= '$presets[\''. $preset['presetname'] .'\'] = ';
+  $exported = '$preset = ';
   $exported .= var_export($preset, TRUE) .';';
   $rows = substr_count($exported, "\n") + 1;
 
@@ -302,6 +300,64 @@ function imagecache_ui_preset_form_submit($form, &$form_state) {
   $form_state['redirect'] = 'admin/build/imagecache/'. $preset['presetid'];
 }
 
+function imagecache_ui_preset_import_form($form_state, $preset = array()) {
+
+  $form = array();
+  $form['import'] = array(
+    '#type' => 'textarea',
+    '#default_value' => '',
+    '#rows' => 60,
+    '#resizable' => TRUE,
+	'#validate' => array('imagecache_element_presetname_validate' => array()),
+  );
+  
+  $form['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Import Preset'),
+    '#weight' => 9,
+  );
+ 
+  return $form;
+}
+
+function imagecache_ui_preset_import_form_validate($form, &$form_state) {
+  $values = $form_state['values'];
+  eval($values['import']);
+  //only validates presetname
+  foreach (imagecache_presets() as $existing_preset) {
+    if ($preset['presetname'] == $existing_preset['presetname'] && $preset['presetid'] != $existing_preset['presetid']) {
+      form_set_error('presetname', t('The preset name is already in use.'));
+      break;
+    }
+  }
+
+  // Check for illegal characters in preset names
+  if (preg_match('/[^0-9a-zA-Z_\-]/', $preset['presetname'])) {
+    form_set_error('presetname', t('Please only use alphanumeric characters, underscores (_), and hyphens (-) for preset names.'));
+  }
+}
+
+function imagecache_ui_preset_import_form_submit($form, &$form_state) {
+  $values = $form_state['values'];
+  eval($values['import']);
+  
+  // Save the preset first to retrieve the presetid when overriding
+  $preset = imagecache_preset_save($preset);
+
+  // Populate the presetid as needed for overrides
+  if (isset($preset['actions'])) {
+    foreach($preset['actions'] as $action) {
+      if (empty($action['presetid'])) {
+        $action['presetid'] = $preset['presetid'];
+      }
+      imagecache_action_save($action);
+    }
+  }
+
+  // Push back to the preset form
+  $form_state['redirect'] = 'admin/build/imagecache/'. $preset['presetid'];
+}
+
 function theme_imagecache_ui_preset_actions($form) {
   $header = array(t('Action'), t('Settings'));
   // $header = array(, t('Weight'), '','');
