diff --git a/modules/user/user.module b/modules/user/user.module
index 044ad46..41b300e 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -108,7 +108,7 @@ function user_module_invoke($type, &$edit, $account, $category = NULL) {
 function user_theme() {
   return array(
     'user_picture' => array(
-      'variables' => array('account' => NULL),
+      'variables' => array('account' => NULL, 'style_name' => NULL),
       'template' => 'user-picture',
     ),
     'user_profile' => array(
@@ -1429,9 +1429,11 @@ function user_block_view($delta = '') {
 /**
  * Process variables for user-picture.tpl.php.
  *
- * The $variables array contains the following arguments:
- * - $account: A user, node or comment object with 'name', 'uid' and 'picture'
- *   fields.
+ * @param $variables
+ *   An associative array containing:
+ *   - account: A user, node or comment object with 'name', 'uid' and 'picture'
+ *     fields.
+ *   - style_name: The name of the style to be used to alter the profile image.
  *
  * @see user-picture.tpl.php
  */
@@ -1459,10 +1461,13 @@ function template_preprocess_user_picture(&$variables) {
     }
     if (isset($filepath)) {
       $alt = t("@user's picture", array('@user' => format_username($account)));
+      if (empty($variables['style_name'])) {
+        $variables['style_name'] = variable_get('user_picture_style', '');
+      }
       // If the image does not have a valid Drupal scheme (for eg. HTTP),
       // don't load image styles.
-      if (module_exists('image') && file_valid_uri($filepath) && $style = variable_get('user_picture_style', '')) {
-        $variables['user_picture'] = theme('image_style', array('style_name' => $style, 'path' => $filepath, 'alt' => $alt, 'title' => $alt));
+      if (module_exists('image') && file_valid_uri($filepath) && $variables['style_name']) {
+        $variables['user_picture'] = theme('image_style', array('style_name' => $variables['style_name'], 'path' => $filepath, 'alt' => $alt, 'title' => $alt));
       }
       else {
         $variables['user_picture'] = theme('image', array('path' => $filepath, 'alt' => $alt, 'title' => $alt));
