diff --git a/flickr.admin.inc b/flickr.admin.inc
index e291651..96661b0 100644
--- a/flickr.admin.inc
+++ b/flickr.admin.inc
@@ -104,7 +104,7 @@ function flickr_admin_settings() {
   );
   $form['info_settings']['flickr_metadata_suppress_on_small'] = array(
     '#type' => 'textfield',
-    '#title' => t('Minimum image width to display date, location and photographer under the caption'),
+    '#title' => t('Minimum image width to display date, location, photographer and optionally license info under the caption'),
     '#required' => TRUE,
     '#default_value' => variable_get('flickr_metadata_suppress_on_small', '150'),
     '#description' => t('Suppress extra info on small images. After saving the configuration <a href="?q=admin/config/development/performance">clear the cache</a>.'),
@@ -112,12 +112,18 @@ function flickr_admin_settings() {
     '#size' => 3,
     '#maxlength' => 3,
   );
+  $form['info_settings']['flickr_license'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('License info in caption'),
+    '#default_value' => variable_get('flickr_license', 0),
+    '#description' => t("Depending on 'Minimum image width' above."),
+  );
   $form['info_settings']['flickr_caption_padding'] = array(
     '#type' => 'textfield',
     '#title' => t('What horizontal inside spacing is applied on the caption? (padding/border)'),
     '#required' => TRUE,
     '#default_value' => variable_get('flickr_caption_padding', '0'),
-    '#description' => t('By default the caption is as width as the image. If you add padding to a boxed caption with CSS, set a value here to make sure the caption will remain of the same width of the image. See <a href="https://drupal.org/node/2174131#caption" title="Flickr module documentation on Drupal.org" target="_blank">Style Guide</a>.<br />Only padding: 1 x horizontal caption value.<br />Padding AND border: 2 x caption value + 1x border-width.'),
+    '#description' => t('By default the caption is as wide as the image. If you add padding to a boxed caption with CSS, set a value here to make sure the caption will remain of the same width of the image. See <a href="https://drupal.org/node/2174131#caption" title="Flickr module documentation on Drupal.org" target="_blank">Style Guide</a>.<br />Only padding: 1 x horizontal caption value.<br />Padding AND border: 2 x caption value + 1x border-width.'),
     '#field_suffix' => t('px'),
     '#size' => 2,
     '#maxlength' => 2,
@@ -129,11 +135,13 @@ function flickr_admin_settings() {
       'title' => 'title',
       'metadata' => 'metadata',
       'description' => 'description',
+      'license' => 0,
     )),
     '#options' => array(
       'title' => t('Title'),
       'metadata' => t('Date, location and photographer'),
       'description' => t('Description'),
+      'license' => t('License info'),
     ),
   );
   $form['overlay_settings'] = array(
diff --git a/flickr.css b/flickr.css
index fdd483e..1b4946a 100644
--- a/flickr.css
+++ b/flickr.css
@@ -33,3 +33,23 @@ span.flickr-credit {
   line-height: 100%;
   font-size: 80%;
 }
+
+@media screen {
+  @font-face {
+    font-family: 'CC-ICONS';
+    font-style: normal;
+    font-weight: normal;
+    src: url('http://mirrors.creativecommons.org/presskit/cc-icons.ttf') format('truetype');
+  }
+  span.flickr-cc {
+    /*Creative commons icon font*/
+    font-family: 'CC-ICONS';
+    /*The normal size is not well recognizable*/
+    font-size: large;
+    float: right;
+    /*An equivalent to baseline shift to space icons from the line above*/
+    position: relative;
+    top: .20em;
+    margin-bottom: 5px;
+  }
+}
diff --git a/flickr.install b/flickr.install
index 36a5efc..45b6229 100644
--- a/flickr.install
+++ b/flickr.install
@@ -20,6 +20,7 @@ function flickr_uninstall() {
   variable_del('flickr_rel');
   variable_del('flickr_title_suppress_on_small');
   variable_del('flickr_caption_padding');
+  variable_del('flickr_license');
 }
 
 /**
@@ -51,3 +52,21 @@ function flickr_schema() {
   );
   return $schema;
 }
+
+/**
+ * Implements hook_update().
+ */
+function flickr_update_7001() {
+  // Create new index on variable 'flickr_info_overlay' without altering others.
+  $overlay = variable_get('flickr_info_overlay', array(
+    'title' => 'title',
+    'metadata' => 'metadata',
+    'description' => 'description',
+  ));
+  variable_set('flickr_info_overlay', array(
+    'title' => $overlay['title'],
+    'metadata' => $overlay['metadata'],
+    'description' => $overlay['description'],
+    'license' => 0,
+  ));
+}
diff --git a/flickr.module b/flickr.module
index 24ac5da..82dc0c9 100644
--- a/flickr.module
+++ b/flickr.module
@@ -232,7 +232,7 @@ function flickr_user_presave(&$edit, $account, $category) {
         ->execute();
     }
     /*
-    else if ($user_affected) {
+    elseif ($user_affected) {
       //Flickr account deleted
       drupal_set_message(t("%username's Flickr page has been deleted.", array('%username' => $account->name)));
     }
@@ -345,22 +345,73 @@ function theme_flickr_photo($variables) {
   $region = isset($info['location']['region']['_content']) ? strip_tags($info['location']['region']['_content']) . ', ' : '';
   $country = isset($info['location']['country']['_content']) ? strip_tags($info['location']['country']['_content']) : '';
   $location = !empty($country) ? ' ' . t('at') . ' ' . $neighbourhood . $locality . $region . $country : '';
+  switch ($info['license']) {
+    case '0':
+      $license = '<br />&copy; ' . t('All Rights Reserved');
+      $licenselong = '&copy; ' . t('All Rights Reserved');
+      break;
+
+    case '1':
+      $license = ' <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/" title="' . t('Creative Commons — Attribution-NonCommercial-ShareAlike 2.0 Generic — CC BY-NC-SA 2.0') . '" target="_blank"><span class="flickr-cc">cna</span></a>';
+      $licenselong = t('Creative Commons, Attribution, Non Commercial, ShareAlike');
+      break;
+
+    case '2':
+      $license = ' <a href="http://creativecommons.org/licenses/by-nc/2.0/" title="' . t('Creative Commons — Attribution-NonCommercial 2.0 Generic — CC BY-NC 2.0') . '" target="_blank"><span class="flickr-cc">cn</span></a>';
+      $licenselong = t('Creative Commons, Attribution, Non Commercial');
+      break;
+
+    case '3':
+      $license = ' <a href="http://creativecommons.org/licenses/by-nc-nd/2.0/" title="' . t('Creative Commons — Attribution-NonCommercial-NoDerivs 2.0 Generic — CC BY-NC-ND 2.0') . '" target="_blank"><span class="flickr-cc">cnd</span></a>';
+      $licenselong = t('Creative Commons, Attribution, Non Commercial, No Derivs');
+      break;
+
+    case '4':
+      $license = ' <a href="http://creativecommons.org/licenses/by/2.0/" title="' . t('Creative Commons — Attribution 2.0 Generic — CC BY 2.0') . '" target="_blank"><span class="flickr-cc">c</span></a>';
+      $licenselong = t('Creative Commons, Attribution');
+      break;
+
+    case '5':
+      $license = ' <a href="http://creativecommons.org/licenses/by-sa/2.0/" title="' . t('Creative Commons — Attribution-ShareAlike 2.0 Generic — CC BY-SA 2.0') . '" target="_blank"><span class="flickr-cc">cs</span></a>';
+      $licenselong = t('Creative Commons, Attribution, Share Alike');
+      break;
+
+    case '6':
+      $license = ' <a href="http://creativecommons.org/licenses/by-nd/2.0/" title="' . t('Creative Commons — Attribution-NoDerivs 2.0 Generic — CC BY-ND 2.0') . '" target="_blank"><span class="flickr-cc">cd</span></a>';
+      $licenselong = t('Creative Commons, Attribution, No Derivs');
+      break;
+
+    case '7':
+      $license = '<br /><a href="http://flickr.com/commons/usage/" title="' . t('Flickr: The Commons') . '" target="_blank">No known copyright restrictions</a>';
+      $licenselong = t('No known copyright restrictions');
+      break;
+
+    case '8':
+      $license = '<br /><a href="http://www.usa.gov/copyright.shtml" title="' . t('Copyright and Other Rights Pertaining to U.S. Government Works | USA.gov') . '" target="_blank">United States Government Work</a>';
+      $licenselong = t('Copyright and Other Rights Pertaining to U.S. Government Works | USA.gov');
+      break;
+  }
+  if (variable_get('flickr_license', 0) == 0) {
+    $license = '';
+  }
   // Compose extra Flickr info as HTML to render.
   $metadata = '<br />' . $taken . $location . ' ' . t('by') . ' ' . $username;
   // Image width < 100 px is too small for most titles. Can be set differently.
   $credit = $width < variable_get('flickr_title_suppress_on_small', '100') ? t('Flickr') : $title;
   // Image width < 150 px is too small for extra info. Can be set differently.
-  $metadatacaption = $width < variable_get('flickr_metadata_suppress_on_small', '150') ? '' : $metadata;
+  $metadatacaption = $width < variable_get('flickr_metadata_suppress_on_small', '150') ? '' : $metadata . $license;
   // Determine what info goes with the enlarged version of the image.
   $overlay = variable_get('flickr_info_overlay', array(
     'title' => 'title',
     'metadata' => 'metadata',
     'description' => 'description',
+    'license' => 0,
   ));
   $overlaytitle = (gettype($overlay['title']) == 'integer') ? '' : $title . ' - ';
   $metadata = (gettype($overlay['metadata']) == 'integer') ? '' : $metadata . ' - ';
-  $description = (gettype($overlay['description']) == 'integer' || $overlaytitle == $description . ' - ') ? '' : $description;
-  $overlayhtml = $overlaytitle . $metadata . $description;
+  $description = (gettype($overlay['description']) == 'integer' || $overlaytitle == $description . ' - ') ? '' : $description . ' - ';
+  $licenselong = (gettype($overlay['license']) == 'integer') ? '' : $licenselong;
+  $overlayhtml = $overlaytitle . $metadata . $description . $licenselong;
   // Final step when NO overlay browser is used that generates the image that
   // links to the Flickr page to comply with the TOS of Flickr.
   if (variable_get('flickr_class') == NULL && variable_get('flickr_rel') == NULL) {
@@ -381,7 +432,8 @@ function theme_flickr_photo($variables) {
       'attributes' => array(
         'title' => $overlayhtml,
         'class' => array($class),
-        'rel' => $rel),
+        'rel' => $rel,
+      ),
       'absolute' => TRUE,
       'html' => TRUE,
     )) . '<span class="flickr-credit" style="width: ' . ($width - variable_get('flickr_caption_padding', '0')) . 'px;">' . l($credit, $photo_url, array(
