diff --git a/scald_gallery.module b/scald_gallery.module
index 9803285..4696775 100644
--- a/scald_gallery.module
+++ b/scald_gallery.module
@@ -258,3 +258,84 @@ function scald_gallery_scald_fetch($atom, $type) {
   }
 }
 
+/**
+ * Implements hook_scald_prerender().
+ *
+ * for use with a player other than scald_galleria.
+ */
+function scald_gallery_scald_prerender($atom, $context, $options, $mode) {
+  if ($mode == 'atom') {
+    $config = scald_context_config_load($context);
+
+    $player = $config->player['gallery']['*'];
+    if ($player == 'galleria') { // or just $player != 'default' ?
+      return;
+    }
+    // prerender gallery as an image atom
+
+    // Find out which transcoder is in use, and checks if it's
+    // one of the transcoder provided by Scald Image.
+    $style_name = NULL;
+    $mappings = NULL;
+    $transcoder = $config->transcoder['gallery']['*'];
+    // Image style support.
+    if (preg_match('/^style-(.*)$/', $transcoder, $match)) {
+      $style_name = $match[1];
+    }
+    // Picture support.
+    elseif (module_exists('picture') && preg_match('/^group-(.*)$/', $transcoder, $match)) {
+      $mappings = picture_mapping_load($match[1]);
+    }
+
+    // Default attributes, which can be overridden by field settings.
+    $attributes = array(
+      'alt' => $atom->title,
+      'title' => $atom->title,
+    );
+    $items = field_get_items('scald_atom', $atom, 'scald_thumbnail');
+    $thumbnail = !empty($items) ? $items[0] : array();
+    foreach (array('alt', 'title', 'width', 'height') as $attribute_name) {
+      if (isset($thumbnail[$attribute_name]) && $thumbnail[$attribute_name]) {
+        $attributes[$attribute_name] = $thumbnail[$attribute_name];
+      }
+    }
+
+    if (!empty($style_name)) {
+      $atom->rendered->player = theme('image_style', array(
+        'path' => $atom->file_source,
+        'style_name' => $style_name
+      ) + $attributes);
+    }
+    elseif (isset($mappings)) {
+      foreach ($mappings->mapping as $breakpoint_name => $multipliers) {
+        if (!empty($multipliers)) {
+          foreach ($multipliers as $multiplier => $image_style) {
+            if (!$image_style) {
+              continue;
+            }
+            // $image_style is machine name in Picture 1.x and an array in
+            // Picture 2.x.
+            if (is_array($image_style) && $image_style['mapping_type'] === '_none') {
+              continue;
+            }
+            $fallback_image_style = is_array($image_style) ? $image_style['image_style'] : $image_style;
+            break 2;
+          }
+        }
+      }
+      // The fallback_image_style is the first image style we find, and so if it
+      // is empty then we do not have any image style.
+      if (!empty($fallback_image_style)) {
+        $atom->rendered->player = theme('picture', array(
+          'uri' => $atom->file_source,
+          'style_name' => $fallback_image_style,
+          'breakpoints' => $mappings->mapping
+        ) + $attributes);
+      }
+    }
+    else {
+      $path = empty($atom->rendered->file_transcoded_url) ? $atom->file_source : $atom->rendered->file_transcoded_url;
+      $atom->rendered->player = theme('image', array('path' => $path) + $attributes);
+    }
+  }
+}
