diff --git a/metatag_twitter_cards/metatag_twitter_cards.metatag.inc b/metatag_twitter_cards/metatag_twitter_cards.metatag.inc
index 24cdfb2..c96eddf 100644
--- a/metatag_twitter_cards/metatag_twitter_cards.metatag.inc
+++ b/metatag_twitter_cards/metatag_twitter_cards.metatag.inc
@@ -161,6 +161,10 @@ function metatag_twitter_cards_metatag_info() {
     'label' => t('Image URL'),
     'description' => t('The URL to a unique image representing the content of the page. Do not use a generic image such as your website logo, author photo, or other image that spans multiple pages. Images larger than 120x120px will be resized and cropped square based on longest dimension. Images smaller than 60x60px will not be shown. If the \'type\' is set to <em>Photo</em> then the image must be at least 280x150px.'),
     'weight' => ++$weight,
+    'element' => array(
+      '#theme' => 'metatag_twitter_cards_single',
+      '#offset' => 0,
+    ),
     'replaces' => array(
       'twitter:image',
     ),
@@ -216,21 +220,37 @@ function metatag_twitter_cards_metatag_info() {
     'label' => t('1st Gallery Image'),
     'description' => t('A URL to the image representing the first photo in your gallery.'),
     'weight' => ++$weight,
+    'element' => array(
+      '#theme' => 'metatag_twitter_cards_single',
+      '#offset' => 0,
+    ),
   ) + $gallery_defaults;
   $info['tags']['twitter:image1'] = array(
     'label' => t('2nd Gallery Image'),
     'description' => t('A URL to the image representing the second photo in your gallery.'),
     'weight' => ++$weight,
+    'element' => array(
+      '#theme' => 'metatag_twitter_cards_single',
+      '#offset' => 1,
+    ),
   ) + $gallery_defaults;
   $info['tags']['twitter:image2'] = array(
     'label' => t('3rd Gallery Image'),
     'description' => t('A URL to the image representing the third photo in your gallery.'),
     'weight' => ++$weight,
+    'element' => array(
+      '#theme' => 'metatag_twitter_cards_single',
+      '#offset' => 2,
+    ),
   ) + $gallery_defaults;
   $info['tags']['twitter:image3'] = array(
     'label' => t('4th Gallery Image'),
     'description' => t('A URL to the image representing the fourth photo in your gallery.'),
     'weight' => ++$weight,
+    'element' => array(
+      '#theme' => 'metatag_twitter_cards_single',
+      '#offset' => 3,
+    ),
   ) + $gallery_defaults;
 
   // 'player' cards.
diff --git a/metatag_twitter_cards/metatag_twitter_cards.module b/metatag_twitter_cards/metatag_twitter_cards.module
index e848fac..51cc044 100644
--- a/metatag_twitter_cards/metatag_twitter_cards.module
+++ b/metatag_twitter_cards/metatag_twitter_cards.module
@@ -20,6 +20,9 @@ function metatag_twitter_cards_theme() {
   $info['metatag_twitter_cards'] = array(
     'render element' => 'element',
   );
+  $info['metatag_twitter_cards_single'] = array(
+    'render element' => 'element',
+  );
 
   return $info;
 }
@@ -33,3 +36,31 @@ function theme_metatag_twitter_cards($variables) {
   unset($element['#value']);
   return theme('html_tag', $variables);
 }
+
+/**
+ * Theme callback for an twittercard meta tag expecting a singl value.
+ */
+function theme_metatag_twitter_cards_single($variables) {
+  $element = &$variables['element'];
+
+  // Assume we need the first value.
+  $offset = 0;
+  if (isset($element['#offset'])) {
+    $offset = $element['#offset'];
+    unset($element['#offset']);
+  }
+
+  $value = $element['#value'];
+  $values = explode(',', $element['#value']);
+  if (isset($values[$offset])) {
+    $element['#value'] = trim($values[$offset]);
+  }
+  else {
+    // No value available.
+    return;
+  }
+
+  element_set_attributes($element, array('#name' => 'name', '#value' => 'content'));
+  unset($element['#value']);
+  return theme('html_tag', $variables);
+}
