Index: /trunk/admin.php
===================================================================
--- /trunk/admin.php	(revision 12929)
+++ /trunk/admin.php	(revision 12930)
@@ -180,5 +180,4 @@
     'U_BATCH'=> $link_start.'batch_manager',
     'U_TAGS'=> $link_start.'tags',
-    'U_THUMBNAILS'=> $link_start.'thumbnail',
     'U_USERS'=> $link_start.'user_list',
     'U_GROUPS'=> $link_start.'group_list',
Index: /trunk/admin/batch_manager_global.php
===================================================================
--- /trunk/admin/batch_manager_global.php	(revision 12929)
+++ /trunk/admin/batch_manager_global.php	(revision 12930)
@@ -416,5 +416,4 @@
     }
     save_upload_form_config($updates);
-    $template->delete_compiled_templates();
   }
 
@@ -759,10 +758,4 @@
   );
 
-function regenerateThumbnails_prefilter($content, $smarty)
-{
-  return str_replace('{$thumbnail.TN_SRC}', '{$thumbnail.TN_SRC}?rand='.md5(uniqid(rand(), true)), $content);
-}
-$template->set_prefilter('batch_manager_global', 'regenerateThumbnails_prefilter');
-
 trigger_action('loc_end_element_set_global');
 
Index: /trunk/admin/include/functions.php
===================================================================
--- /trunk/admin/include/functions.php	(revision 12929)
+++ /trunk/admin/include/functions.php	(revision 12930)
@@ -2016,5 +2016,4 @@
     case 'history':
     case 'maintenance':
-    case 'thumbnail':
     case 'comments':
     case 'updates':
Index: /trunk/admin/themes/default/template/admin.tpl
===================================================================
--- /trunk/admin/themes/default/template/admin.tpl	(revision 12929)
+++ /trunk/admin/themes/default/template/admin.tpl	(revision 12930)
@@ -71,7 +71,4 @@
 {/if}
         <li><a href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
-{if $ENABLE_SYNCHRONIZATION}
-        <li><a href="{$U_THUMBNAILS}">{'Thumbnails'|@translate}</a></li>
-{/if}
         <li><a href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
 {if isset($U_PENDING_COMMENTS)}
Index: unk/admin/themes/default/template/thumbnail.tpl
===================================================================
--- /trunk/admin/themes/default/template/thumbnail.tpl	(revision 12929)
+++ 	(revision )
@@ -1,162 +1,0 @@
-{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
-
-{footer_script}
-var width_str = '{'Width'|@translate}';
-var height_str = '{'Height'|@translate}';
-var max_width_str = '{'Maximum Width'|@translate}';
-var max_height_str = '{'Maximum Height'|@translate}';
-var remaining = '{'photos without thumbnail (jpeg and png only)'|@translate}';
-var todo = {$TOTAL_NB_REMAINING};
-var done = 0;
-
-{literal}
-var queuedManager = $.manageAjax.create('queued', { 
-  queue: true,  
-  cacheResponse: false,
-  maxRequests: 3,
-  complete: function() {
-    jQuery("#thumb_remaining").text(todo-(++done) + ' ' + remaining);
-    if (todo == done) {
-      jQuery('.waiting_bar, #thumb_remaining, .properties').hide();
-    }
-  }
-}); 
-
-function processThumbs(width,height,crop,follow_orientation) {
-  jQuery('tr.nothumb').each(function() {
-    var image_path = jQuery(this).find('td.filepath').text();
-    var td=this;
-    queuedManager.add({
-      type: 'GET', 
-      url: 'ws.php', 
-      data: {
-        method: 'pwg.images.resizeThumbnail',
-        image_path: image_path,
-        maxwidth: width,
-        maxheight: height,
-        crop: crop,
-        follow_orientation: follow_orientation,
-        format:'json'
-      },
-      dataType: 'json',
-      success: (function(row) { return function(data) {
-          if (data.stat =='ok') {
-            if (todo < 200)
-              jQuery(row).find('td.thumbpic').html('<img src="'+data.result.destination+'"/>');
-            jQuery(row).find('td.thumbdim').html(""+data.result.width+" x "+data.result.height);
-            jQuery(row).find('td.thumbgentime').html(""+data.result.time);
-            jQuery(row).find('td.thumbsize').html(""+data.result.size);
-            jQuery(row).removeClass("nothumb");
-          } else {
-            jQuery(row).find('td.thumbdim').html('#ERR#'+data.err+"# : "+data.message);
-            jQuery(row).removeClass("nothumb");
-            jQuery(row).addClass("error");
-          }
-        }
-      })(td)
-    });
-  });
-}
-
-function toggleCropFields() {
-  if (jQuery("#thumb_crop").is(':checked')) {
-    jQuery("label[for='thumb_maxwidth']").text(width_str);
-    jQuery("label[for='thumb_maxheight']").text(height_str);
-    jQuery("#thumb_follow_orientation_li").show();
-  }
-  else {
-    jQuery("label[for='thumb_maxwidth']").text(max_width_str);
-    jQuery("label[for='thumb_maxheight']").text(max_height_str);
-    jQuery("#thumb_follow_orientation_li").hide();
-  }
-}
-
-jQuery(document).ready(function(){
-  jQuery('input#proceed').click (function () {
-    var width = jQuery('input[name="thumb_maxwidth"]').val();
-    var height = jQuery('input[name="thumb_maxheight"]').val();
-    var crop = jQuery('#thumb_crop').is(':checked');
-    var follow_orientation = jQuery('#thumb_follow_orientation').is(':checked');
-    jQuery(".waiting_bar").toggle();
-    if (todo < 200)
-      jQuery('.thumbpic').show();
-    jQuery('.thumbgentime, .thumbsize, .thumbdim').show();
-    processThumbs(width,height,crop,follow_orientation);
-  });
-
-  toggleCropFields();
-  jQuery("#thumb_crop").click(function () {toggleCropFields()});
-
-  jQuery('.thumbpic, .thumbgentime, .thumbsize, .thumbdim').hide();
-});
-{/literal}{/footer_script}
-
-<div class="titrePage">
-  <h2>{'Thumbnail creation'|@translate}</h2>
-</div>
-
-{if !empty($remainings) }
-<form method="post" action="{$params.F_ACTION}" class="properties">
-
-  <fieldset>
-    <legend>{'Thumbnail creation'|@translate}</legend>
-
-    <ul>
-      <li>
-        <span class="property"><label for="thumb_crop">{'Crop'|@translate}</label></span>
-        <input type="checkbox" name="thumb_crop" id="thumb_crop" {$values.thumb_crop}>
-      </li>
-      <li id="thumb_follow_orientation_li">
-        <span class="property"><label for="thumb_follow_orientation">{'Follow Orientation'|@translate}</label></span>
-        <input type="checkbox" name="thumb_follow_orientation" id="thumb_follow_orientation" {$values.thumb_follow_orientation}>
-      </li>
-      <li>
-        <span class="property"><label for="thumb_maxwidth">{'Maximum Width'|@translate}</label></span>
-        <input type="text" name="thumb_maxwidth" id="thumb_maxwidth" value="{$values.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}
-      </li>
-      <li>
-        <span class="property"><label for="thumb_maxheight">{'Maximum Height'|@translate}</label></span>
-        <input type="text" name="thumb_maxheight" id="thumb_maxheight" value="{$values.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}
-      </li>
-      <li>
-        <span class="property"><label for="thumb_quality">{'Image Quality'|@translate}</label></span>
-        <input type="text" name="thumb_quality" id="thumb_quality" value="{$values.thumb_quality}" size="3" maxlength="3"> %
-      </li>
-    </ul>
-  </fieldset>
-
-  <p class="waiting_bar"><input type="button" name="submit" id="proceed" value="{'Submit'|@translate}"></p>
-  <p class="waiting_bar" style="display:none;">{'Please wait...'|@translate}<br><img src="admin/themes/default/images/ajax-loader-bar.gif"></p>
-</form>
-
-<div class="admin"><span id="thumb_remaining">{$TOTAL_NB_REMAINING} {'photos without thumbnail (jpeg and png only)'|@translate}</span></div>
-<table style="width:100%;">
-  <tr class="throw">
-    <th>&nbsp;</th>
-    <th style="width:60%;">{'Path'|@translate}</th>
-    <th>{'Filesize'|@translate}</th>
-    <th>{'Dimensions'|@translate}</th>
-    <th class="thumbpic">{'Thumbnail'|@translate}</th>
-    <th class="thumbgentime">{'generated in'|@translate}</th>
-    <th class="thumbsize">{'Filesize'|@translate}</th>
-    <th class="thumbdim">{'Dimensions'|@translate}</th>
-  </tr>
-  {foreach from=$remainings item=elt name=remain_loop}
-  <tr class="{if $smarty.foreach.remain_loop.index is odd}row1{else}row2{/if} nothumb item" id="th_{$smarty.foreach.remain_loop.iteration}">
-    <td>{$smarty.foreach.remain_loop.iteration}</td>
-    <td class="filepath">{$elt.PATH}</td>
-    <td>{$elt.FILESIZE_IMG}</td>
-    <td>{$elt.WIDTH_IMG} x {$elt.HEIGHT_IMG}</td>
-  <td class="thumbpic"><img src="admin/themes/default/images/ajax-loader.gif"></td>
-  <td class="thumbgentime">&nbsp;</td>
-  <td class="thumbsize">&nbsp;</td>
-  <td class="thumbdim">&nbsp;</td>
-  </tr>
-  {/foreach}
-</table>
-{else}
-<p style="text-align:left;margin:20px;">
-<b>{'No missing thumbnail'|@translate}</b><br><br>
-{'If you want to regenerate thumbnails, please go to the <a href="%s">Batch Manager</a>.'|@translate|@sprintf:"admin.php?page=batch_manager"}
-</p>
-{/if}
Index: unk/admin/thumbnail.php
===================================================================
--- /trunk/admin/thumbnail.php	(revision 12929)
+++ 	(revision )
@@ -1,140 +1,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2012 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_upload.inc.php');
-
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// |                          Load configuration                           |
-// +-----------------------------------------------------------------------+
-$upload_form_config = get_upload_form_config();
-
-$form_values = array();
-
-foreach ($upload_form_config as $param_shortname => $param)
-{
-  $param_name = 'upload_form_'.$param_shortname;
-  $form_values[$param_shortname] = $conf[$param_name];
-}
-
-// +-----------------------------------------------------------------------+
-// |                   search pictures without thumbnails                  |
-// +-----------------------------------------------------------------------+
-$wo_thumbnails = array();
-
-// what is the directory to search in ?
-$query = '
-SELECT galleries_url FROM '.SITES_TABLE.'
-  WHERE galleries_url NOT LIKE \'http://%\'
-;';
-$result = pwg_query($query);
-while ( $row=pwg_db_fetch_assoc($result) )
-{
-  $basedir = preg_replace('#/*$#', '', $row['galleries_url']);
-  $fs = get_fs($basedir);
-
-  // because isset is one hundred time faster than in_array
-  $fs['thumbnails'] = array_flip($fs['thumbnails']);
-
-  foreach ($fs['elements'] as $path)
-  {
-    // only pictures need thumbnails
-    if (in_array(get_extension($path), $conf['picture_ext']))
-    {
-      $dirname = dirname($path);
-      $filename = basename($path);
-  
-      // only files matching the authorized filename pattern can be considered
-      // as "without thumbnail"
-      if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
-      {
-        continue;
-      }
-      
-      // searching the element
-      $filename_wo_ext = get_filename_wo_extension($filename);
-      $tn_ext = '';
-      $base_test = $dirname.'/'.$conf['dir_thumbnail'].'/';
-      $base_test.= $conf['prefix_thumbnail'].$filename_wo_ext.'.';
-      foreach ($conf['picture_ext'] as $ext)
-      {
-        if (isset($fs['thumbnails'][$base_test.$ext]))
-        {
-          $tn_ext = $ext;
-          break;
-        }
-      }
-      
-      if (empty($tn_ext))
-      {
-        array_push($wo_thumbnails, $path);
-      }
-    }
-  } // next element
-} // next site id
-
-// +-----------------------------------------------------------------------+
-// |             form & pictures without thumbnails display                |
-// +-----------------------------------------------------------------------+
-$template->set_filenames( array('thumbnail'=>'thumbnail.tpl') );
-
-if (count($wo_thumbnails) > 0)
-{
-  foreach ($wo_thumbnails as $path)
-  {
-    list($width, $height) = getimagesize($path);
-    $size = floor(filesize($path) / 1024).' KB';
-
-    $template->append(
-      'remainings',
-      array(
-        'PATH'=>$path,
-        'FILESIZE_IMG'=>$size,
-        'WIDTH_IMG'=>$width,
-        'HEIGHT_IMG'=>$height,
-      )
-    );
-  }
-}
-
-foreach (array_keys($upload_form_config) as $field)
-{
-  if (is_bool($upload_form_config[$field]['default']))
-  {
-    $form_values[$field] = $form_values[$field] ? 'checked="checked"' : '';
-  }
-}
-
-$template->assign(
-  array(
-    'F_ACTION' => get_root_url().'admin.php?page=thumbnail',
-    'values' => $form_values,
-    'TOTAL_NB_REMAINING' => count($wo_thumbnails),
-    'U_HELP' => get_root_url().'admin/popuphelp.php?page=thumbnail',
-  )
-);
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'thumbnail');
-?>
Index: /trunk/comments.php
===================================================================
--- /trunk/comments.php	(revision 12929)
+++ /trunk/comments.php	(revision 12930)
@@ -117,5 +117,5 @@
     $category_ids = array(-1);
   }
-  
+
   $page['where_clauses'][] =
     'category_id IN ('.implode(',', $category_ids).')';
@@ -414,5 +414,5 @@
   $elements = array();
   $query = '
-SELECT id, name, file, path, representative_ext
+SELECT *
   FROM '.IMAGES_TABLE.'
   WHERE id IN ('.implode(',', $element_ids).')
@@ -456,5 +456,5 @@
 
     // source of the thumbnail picture
-    $thumbnail_src = DerivativeImage::thumb_url( $elements[$comment['image_id']] );
+    $src_image = new SrcImage($elements[$comment['image_id']]);
 
     // link to the full size picture
@@ -470,5 +470,5 @@
       'ID' => $comment['comment_id'],
       'U_PICTURE' => $url,
-      'TN_SRC' => $thumbnail_src,
+      'src_image' => $src_image,
       'ALT' => $name,
       'AUTHOR' => trigger_event('render_comment_author', $comment['author']),
@@ -510,9 +510,9 @@
       if (isset($edit_comment) and ($comment['comment_id'] == $edit_comment))
       {
-	$tpl_comment['IN_EDIT'] = true;
-	$key = get_ephemeral_key(2, $comment['image_id']);
-	$tpl_comment['KEY'] = $key;
-	$tpl_comment['IMAGE_ID'] = $comment['image_id'];
-	$tpl_comment['CONTENT'] = $comment['content'];
+        $tpl_comment['IN_EDIT'] = true;
+        $key = get_ephemeral_key(2, $comment['image_id']);
+        $tpl_comment['KEY'] = $key;
+        $tpl_comment['IMAGE_ID'] = $comment['image_id'];
+        $tpl_comment['CONTENT'] = $comment['content'];
       }
     }
@@ -535,4 +535,7 @@
 }
 
+$derivative_params = trigger_event('get_comments_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
+$template->assign( 'derivative_params', $derivative_params );
+
 // include menubar
 $themeconf = $template->get_template_vars('themeconf');
Index: /trunk/include/category_cats.inc.php
===================================================================
--- /trunk/include/category_cats.inc.php	(revision 12929)
+++ /trunk/include/category_cats.inc.php	(revision 12930)
@@ -375,5 +375,5 @@
   }
 
-  $derivative_params = trigger_event('get_index_album_derivative_params', ImageStdParams::get_by_type(IMG_SMALL) );
+  $derivative_params = trigger_event('get_index_album_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
   $tpl_thumbnails_var = trigger_event('loc_end_index_category_thumbnails', $tpl_thumbnails_var, $categories);
   $template->assign( array(
Index: /trunk/language/ar_SA/admin.lang.php
===================================================================
--- /trunk/language/ar_SA/admin.lang.php	(revision 12929)
+++ /trunk/language/ar_SA/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = 'صور لا يمكن الوصول لها او لم تدعم';
 $lang['GD version'] = 'GD أصدار';
-$lang['Miniaturization parameters'] = 'تصغير البارامترات';
 $lang['generated in'] = 'إنشأت في ..';
 $lang['Results of miniaturization'] = 'نتائج التصغير';
Index: /trunk/language/ca_ES/admin.lang.php
===================================================================
--- /trunk/language/ca_ES/admin.lang.php	(revision 12929)
+++ /trunk/language/ca_ES/admin.lang.php	(revision 12930)
@@ -352,5 +352,4 @@
 $lang['Photo unreachable or no support'] = 'Imatge inaccessible o no soportada';
 $lang['GD version'] = 'versió GD';
-$lang['Miniaturization parameters'] = 'Paràmetres de miniaturització';
 $lang['generated in'] = 'generat en';
 $lang['Results of miniaturization'] = 'Resultats de la miniaturització';
Index: /trunk/language/cs_CZ/admin.lang.php
===================================================================
--- /trunk/language/cs_CZ/admin.lang.php	(revision 12929)
+++ /trunk/language/cs_CZ/admin.lang.php	(revision 12930)
@@ -350,5 +350,4 @@
 $lang['Photo unreachable or no support'] = 'Fotografie není dostupná nebo podporovaná';
 $lang['GD version'] = 'Verze GD knihovny';
-$lang['Miniaturization parameters'] = 'Parametry miniaturizace';
 $lang['generated in'] = 'generováno během';
 $lang['Results of miniaturization'] = 'Výsledky miniaturizace';
Index: /trunk/language/da_DK/admin.lang.php
===================================================================
--- /trunk/language/da_DK/admin.lang.php	(revision 12929)
+++ /trunk/language/da_DK/admin.lang.php	(revision 12930)
@@ -351,5 +351,4 @@
 $lang['Photo unreachable or no support']     =     'Picture utilgængelig eller ikke understøttet format';
 $lang['GD version']     =     'GD version';
-$lang['Miniaturization parameters']     =     'Miniaturisering parametre';
 $lang['generated in']     =     'Genereret i';
 $lang['Results of miniaturization']     =     'Miniaturisering proces resultater';
Index: /trunk/language/de_DE/admin.lang.php
===================================================================
--- /trunk/language/de_DE/admin.lang.php	(revision 12929)
+++ /trunk/language/de_DE/admin.lang.php	(revision 12930)
@@ -345,5 +345,4 @@
 $lang['Photo unreachable or no support'] = 'Foto unerreichbar oder nicht unterstützt';
 $lang['GD version'] = 'Version von GD Library';
-$lang['Miniaturization parameters'] = 'Einstellungen für die Vorschaubilderstellung';
 $lang['generated in'] = 'generiert in';
 $lang['Results of miniaturization'] = 'Ergebnis der Vorschaubilderstellung';
Index: /trunk/language/en_UK/admin.lang.php
===================================================================
--- /trunk/language/en_UK/admin.lang.php	(revision 12929)
+++ /trunk/language/en_UK/admin.lang.php	(revision 12930)
@@ -321,5 +321,4 @@
 $lang['generate file listing.xml on remote site'] = "generate file listing.xml on the remote site";
 $lang['generate listing'] = "generate listing";
-$lang['generated in'] = "generated in";
 $lang['Get Support on Piwigo Forum'] = 'Get support on Piwigo forum';
 $lang['Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation'] = 'Give write access (chmod 777) to "%s" directory at the root of your Piwigo installation';
@@ -350,6 +349,4 @@
 $lang['High definition enabled'] = "High definition enabled";
 $lang['High definition'] = "High definition";
-$lang['High dimensions'] = 'High resolution dimensions';
-$lang['High filesize'] = "High resolution filesize";
 $lang['high'] = "high";
 $lang['History'] = "History";
@@ -360,5 +357,4 @@
 $lang['If no HD is available and if the current websize is bigger than resize dimensions, Piwigo will move it as HD and create a downsized websize photo from it.'] = 'If no HD is available and if the current websize is bigger than resize dimensions, Piwigo will move it as HD and create a downsized websize photo from it.';
 $lang['If you encounter problems or have any question, please send a message to'] = "If you encounter problems or have any question, please send a message to";
-$lang['If you want to regenerate thumbnails, please go to the <a href="%s">Batch Manager</a>.'] = 'If you want to regenerate thumbnails, please go to the <a href="%s">Batch Manager</a>.';
 $lang['Ignore All'] = 'Ignore All';
 $lang['Ignore selected anomalies'] = "Ignore selected anomalies";
@@ -440,9 +436,6 @@
 $lang['Manual order'] = 'Manual order';
 $lang['manual order'] = 'manual order';
-$lang['max time'] = "max time";
 $lang['Maximum file size: %sB.'] = 'Maximum file size: %sB.';
-$lang['maximum height'] = "Maximum height";
 $lang['Maximum Height'] = 'Maximum height';
-$lang['maximum width'] = "Maximum width";
 $lang['Maximum Width'] = 'Maximum Width';
 $lang['Members'] = "Members";
@@ -452,6 +445,4 @@
 $lang['Metadata synchronization results'] = "Metadata synchronization results";
 $lang['Metadata synchronized from file'] = "Metadata synchronized from file";
-$lang['min time'] = "min time";
-$lang['Miniaturization parameters'] = "Miniaturization parameters";
 $lang['Minimum privacy level'] = "Minimum privacy level";
 $lang['Miscellaneous'] = 'Miscellaneous';
@@ -475,5 +466,4 @@
 $lang['No file was uploaded'] = 'No file was uploaded';
 $lang['No mail to send.'] = "No mail to be sent.";
-$lang['No missing thumbnail'] = "No missing thumbnail";
 $lang['No photo can be deleted'] = "No photo can be deleted";
 $lang['No photo in the current set.'] = 'No photo in the current set.';
@@ -545,5 +535,4 @@
 $lang['photos per page'] = "photos per page";
 $lang['photos updated in the database'] = "photos updated in the database";
-$lang['photos without thumbnail (jpeg and png only)'] = "photos without thumbnail (jpeg and png only)";
 $lang['Photos'] = "Photos";
 $lang['Piwigo Administration'] = "Piwigo Administration";
@@ -620,5 +609,4 @@
 $lang['Restore default configuration. You will lose your plugin settings!'] = "Restore default configuration. You will lose your plugin settings!";
 $lang['Restore'] = "Restore";
-$lang['Results of miniaturization'] = "Miniaturization process results";
 $lang['Save order'] = "Save order";
 $lang['Save page visits by administrators'] = "Record pages visited by administrators";
@@ -735,5 +723,4 @@
 $lang['This site already exists'] = "This site already exists";
 $lang['This theme was not designed to be directly activated'] = 'This theme was not designed to be directly activated';
-$lang['Thumbnail creation'] = "Thumbnail creation";
 $lang['Thumbnail'] = "Thumbnail";
 $lang['Thumbnails generation in progress...'] = 'Thumbnails generation in progress...';
Index: /trunk/language/es_ES/admin.lang.php
===================================================================
--- /trunk/language/es_ES/admin.lang.php	(revision 12929)
+++ /trunk/language/es_ES/admin.lang.php	(revision 12930)
@@ -342,5 +342,4 @@
 $lang['Photo unreachable or no support'] = 'foto inaccesible o no soportada';
 $lang['GD version'] = 'versión de GD';
-$lang['Miniaturization parameters'] = 'Parámetro de miniaturización';
 $lang['generated in'] = 'generada en';
 $lang['Results of miniaturization'] = 'Los resultados de la miniaturización';
Index: /trunk/language/fa_IR/admin.lang.php
===================================================================
--- /trunk/language/fa_IR/admin.lang.php	(revision 12929)
+++ /trunk/language/fa_IR/admin.lang.php	(revision 12930)
@@ -350,5 +350,4 @@
 $lang['Photo unreachable or no support'] = "تصاویر غیرقابل دسترسی یا بدون پشتیبانی سیستم";
 $lang['GD version'] = "نصخه GD";
-$lang['Miniaturization parameters'] = "پارامترهای کوچک کردن";
 $lang['generated in'] = "تولید در";
 $lang['Results of miniaturization'] = "نتیج پردازش کوچک‌سازی";
Index: /trunk/language/fr_CA/admin.lang.php
===================================================================
--- /trunk/language/fr_CA/admin.lang.php	(revision 12929)
+++ /trunk/language/fr_CA/admin.lang.php	(revision 12930)
@@ -351,5 +351,4 @@
 $lang['Photo unreachable or no support'] = "Image inaccessible ou format non supporté";
 $lang['GD version'] = "version de GD";
-$lang['Miniaturization parameters'] = "Paramètre de miniaturisation";
 $lang['generated in'] = "générée en";
 $lang['Results of miniaturization'] = "Résultats de la miniaturisation";
Index: /trunk/language/fr_FR/admin.lang.php
===================================================================
--- /trunk/language/fr_FR/admin.lang.php	(revision 12929)
+++ /trunk/language/fr_FR/admin.lang.php	(revision 12930)
@@ -349,5 +349,4 @@
 $lang['Photo unreachable or no support'] = 'Photo inaccessible ou format non supporté';
 $lang['GD version'] = "version de GD";
-$lang['Miniaturization parameters'] = "Paramètre de miniaturisation";
 $lang['generated in'] = "générée en";
 $lang['Results of miniaturization'] = "Résultats de la miniaturisation";
Index: /trunk/language/he_IL/admin.lang.php
===================================================================
--- /trunk/language/he_IL/admin.lang.php	(revision 12929)
+++ /trunk/language/he_IL/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = 'תמונה בפורמט נגיש או נתמך';
 $lang['GD version'] = 'גרסת ה ';
-$lang['Miniaturization parameters'] = 'המזעור הפרמטרים';
 $lang['generated in'] = 'נוצר ב';
 $lang['Results of miniaturization'] = 'תהליך המזעור תוצאות';
Index: /trunk/language/hr_HR/admin.lang.php
===================================================================
--- /trunk/language/hr_HR/admin.lang.php	(revision 12929)
+++ /trunk/language/hr_HR/admin.lang.php	(revision 12930)
@@ -343,5 +343,4 @@
 $lang['Photo unreachable or no support'] = 'Slika nedohvatna ili bez podrške';
 $lang['GD version'] = 'GD inačica';
-$lang['Miniaturization parameters'] = 'Postavke umanjivanja';
 $lang['generated in'] = 'izrađena u';
 $lang['Results of miniaturization'] = 'ishodi umanjivanja';
Index: /trunk/language/hu_HU/admin.lang.php
===================================================================
--- /trunk/language/hu_HU/admin.lang.php	(revision 12929)
+++ /trunk/language/hu_HU/admin.lang.php	(revision 12930)
@@ -344,5 +344,4 @@
 $lang['Photo unreachable or no support'] = 'Kép nem elérhető, vagy formátuma nem támogatott';
 $lang['GD version'] = 'GD verzió';
-$lang['Miniaturization parameters'] = 'Kicsinyítési paraméterek';
 $lang['generated in'] = 'létrehozva';
 $lang['Results of miniaturization'] = 'Kicsinyítés eredménye';
@@ -828,5 +827,4 @@
 $lang['Piwigo cannot retrieve upgrade file from server'] = 'Nem tudom letölteni a frissítést a Piwigo fájl szerverről';
 $lang['Zoom'] = 'Zoom';
-
 $lang['High dimensions'] = 'Nagy méret';
 $lang['Downloads'] = 'Letöltés';
Index: /trunk/language/it_IT/admin.lang.php
===================================================================
--- /trunk/language/it_IT/admin.lang.php	(revision 12929)
+++ /trunk/language/it_IT/admin.lang.php	(revision 12930)
@@ -350,5 +350,4 @@
 $lang['Photo unreachable or no support'] = 'Foto non trovata o non supportata';
 $lang['GD version'] = 'versione GD';
-$lang['Miniaturization parameters'] = 'Parametri di miniaturizzazione';
 $lang['generated in'] = 'generata in';
 $lang['Results of miniaturization'] = 'Risultati della miniaturizzazione';
Index: /trunk/language/ja_JP/admin.lang.php
===================================================================
--- /trunk/language/ja_JP/admin.lang.php	(revision 12929)
+++ /trunk/language/ja_JP/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = '写真にアクセスできないか、次の内容がサポートされていません:';
 $lang['GD version'] = 'GDバージョン';
-$lang['Miniaturization parameters'] = '縮小化パラメータ';
 $lang['generated in'] = '生成時間';
 $lang['Results of miniaturization'] = '縮小化の結果';
Index: /trunk/language/ka_GE/admin.lang.php
===================================================================
--- /trunk/language/ka_GE/admin.lang.php	(revision 12929)
+++ /trunk/language/ka_GE/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = 'ფოტო მიუწვდომელია ან არ არის მისი ფორმატის მხარდაჭერა';
 $lang['GD version'] = 'ვერსია GD';
-$lang['Miniaturization parameters'] = 'მინიატურიზაციის პარამეტრები';
 $lang['generated in'] = 'გენერირებულია';
 $lang['Results of miniaturization'] = 'მინიატურიზაციის რეზულტატი';
Index: /trunk/language/lv_LV/admin.lang.php
===================================================================
--- /trunk/language/lv_LV/admin.lang.php	(revision 12929)
+++ /trunk/language/lv_LV/admin.lang.php	(revision 12930)
@@ -346,5 +346,4 @@
 $lang['Photo unreachable or no support'] = 'foto nesasniedzams vai bez atbalsta';
 $lang['GD version'] = 'GD versija';
-$lang['Miniaturization parameters'] = 'Miniaturizēšanas parametri';
 $lang['generated in'] = 'uzģenerēts ';
 $lang['Results of miniaturization'] = 'Miniaturizācijas procesa rezultāti';
Index: /trunk/language/nl_NL/admin.lang.php
===================================================================
--- /trunk/language/nl_NL/admin.lang.php	(revision 12929)
+++ /trunk/language/nl_NL/admin.lang.php	(revision 12930)
@@ -345,5 +345,4 @@
 $lang['Photo unreachable or no support'] = 'Afbeelding is niet bereikbaar of er is geen support';
 $lang['GD version'] = 'GD versie';
-$lang['Miniaturization parameters'] = 'Miniatuur parameters';
 $lang['generated in'] = 'gegenereerd in';
 $lang['Results of miniaturization'] = 'Resultaat van verkleinen';
@@ -839,5 +838,4 @@
 $lang['With no tag'] = 'Zonder tag';
 $lang['With no virtual album'] = 'Zonder virtueel album';
-
 $lang['Photo name'] = 'Naam van afbeelding';
 ?>
Index: /trunk/language/no_NO/admin.lang.php
===================================================================
--- /trunk/language/no_NO/admin.lang.php	(revision 12929)
+++ /trunk/language/no_NO/admin.lang.php	(revision 12930)
@@ -347,5 +347,4 @@
 $lang['Photo unreachable or no support'] = 'Bilde ikke tilgjengelig eller i feil filformat';
 $lang['GD version'] = 'GD versjon';
-$lang['Miniaturization parameters'] = 'Miniatyr parameter';
 $lang['generated in'] = 'generert på';
 $lang['Results of miniaturization'] = 'Miniatyr prosess resultat';
Index: /trunk/language/pl_PL/admin.lang.php
===================================================================
--- /trunk/language/pl_PL/admin.lang.php	(revision 12929)
+++ /trunk/language/pl_PL/admin.lang.php	(revision 12930)
@@ -345,5 +345,4 @@
 $lang['Photo unreachable or no support'] = 'Obraz niedostępny lub brak wsparcia';
 $lang['GD version'] = 'Wersja GD';
-$lang['Miniaturization parameters'] = 'Parametry tworzenia miniatur';
 $lang['generated in'] = 'wygenerowane w';
 $lang['Results of miniaturization'] = 'Wyniki tworzenia miniatur';
Index: /trunk/language/pt_BR/admin.lang.php
===================================================================
--- /trunk/language/pt_BR/admin.lang.php	(revision 12929)
+++ /trunk/language/pt_BR/admin.lang.php	(revision 12930)
@@ -347,5 +347,4 @@
 $lang['Photo unreachable or no support'] = 'Imagem não alcançável ou nenhum suporte';
 $lang['GD version'] = 'versão GD';
-$lang['Miniaturization parameters'] = 'Parâmetros da miniaturização';
 $lang['generated in'] = 'gerado em';
 $lang['Results of miniaturization'] = 'Resultados da miniaturização';
Index: /trunk/language/pt_PT/admin.lang.php
===================================================================
--- /trunk/language/pt_PT/admin.lang.php	(revision 12929)
+++ /trunk/language/pt_PT/admin.lang.php	(revision 12930)
@@ -347,5 +347,4 @@
 $lang['Photo unreachable or no support'] = 'Foto não alcançável ou sem suporte';
 $lang['GD version'] = 'versão GD';
-$lang['Miniaturization parameters'] = 'Parâmetros da miniaturização';
 $lang['generated in'] = 'gerado em';
 $lang['Results of miniaturization'] = 'Resultados da miniaturização';
Index: /trunk/language/ru_RU/admin.lang.php
===================================================================
--- /trunk/language/ru_RU/admin.lang.php	(revision 12929)
+++ /trunk/language/ru_RU/admin.lang.php	(revision 12930)
@@ -345,5 +345,4 @@
 $lang['Photo unreachable or no support'] = 'Фотография недоступна или поддержка не возможна';
 $lang['GD version'] = 'версия GD';
-$lang['Miniaturization parameters'] = 'Параметры миниатюризации';
 $lang['generated in'] = 'создано за';
 $lang['Results of miniaturization'] = 'Результаты миниатюризации';
Index: /trunk/language/sh_RS/admin.lang.php
===================================================================
--- /trunk/language/sh_RS/admin.lang.php	(revision 12929)
+++ /trunk/language/sh_RS/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = 'Slika nedostupna ili bez podrške';
 $lang['GD version'] = 'GD verzija';
-$lang['Miniaturization parameters'] = 'Parametri umanjivanja';
 $lang['generated in'] = 'izrađena u';
 $lang['Results of miniaturization'] = 'rezultati umanjivanja';
Index: /trunk/language/sk_SK/admin.lang.php
===================================================================
--- /trunk/language/sk_SK/admin.lang.php	(revision 12929)
+++ /trunk/language/sk_SK/admin.lang.php	(revision 12930)
@@ -347,5 +347,4 @@
 $lang['Photo unreachable or no support'] = 'Fotografia nie je dostupná alebo podporovaná';
 $lang['GD version'] = 'Verzia GD knihovne';
-$lang['Miniaturization parameters'] = 'Parametre miniaturizácie';
 $lang['generated in'] = 'generované behom';
 $lang['Results of miniaturization'] = 'Výsledky miniaturizácie';
Index: /trunk/language/sr_RS/admin.lang.php
===================================================================
--- /trunk/language/sr_RS/admin.lang.php	(revision 12929)
+++ /trunk/language/sr_RS/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = 'Слика недоступна или без подршке';
 $lang['GD version'] = 'ГД верзија';
-$lang['Miniaturization parameters'] = 'Параметри умањивања';
 $lang['generated in'] = 'израђена у';
 $lang['Results of miniaturization'] = 'резултати умањивања';
Index: /trunk/language/sv_SE/admin.lang.php
===================================================================
--- /trunk/language/sv_SE/admin.lang.php	(revision 12929)
+++ /trunk/language/sv_SE/admin.lang.php	(revision 12930)
@@ -346,5 +346,4 @@
 $lang['Photo unreachable or no support'] = 'Bilden kunde inte nås eller filformatet stöds inte';
 $lang['GD version'] = 'GD version';
-$lang['Miniaturization parameters'] = 'Miniatyriserings parametrar';
 $lang['generated in'] = 'generering tog';
 $lang['Results of miniaturization'] = 'Resultat av miniatyriserings process';
Index: /trunk/language/th_TH/admin.lang.php
===================================================================
--- /trunk/language/th_TH/admin.lang.php	(revision 12929)
+++ /trunk/language/th_TH/admin.lang.php	(revision 12930)
@@ -407,5 +407,4 @@
 $lang['Metadata synchronized from file'] = "ได้ถูกซิงโคไนซ์เมตาดาต้าจากไฟล์";
 $lang['min time'] = "เวลาต่ำสุด";
-$lang['Miniaturization parameters'] = "ตัวแปรการย่อขนาด";
 $lang['Minimum privacy level'] = "ระดับของความเป็นส่วนตัวน้อยที่สุด";
 $lang['Miscellaneous'] = 'เบ็ดเตล็จ';
Index: /trunk/language/tr_TR/admin.lang.php
===================================================================
--- /trunk/language/tr_TR/admin.lang.php	(revision 12929)
+++ /trunk/language/tr_TR/admin.lang.php	(revision 12930)
@@ -450,5 +450,4 @@
 $lang['Metadata synchronized from file'] = 'Metadata dosyadan senkronize edildi';
 $lang['min time'] = 'men kisa time';
-$lang['Miniaturization parameters'] = 'Minyatürlestirme parametreleri';
 $lang['Minimum privacy level'] = 'En az gizlilik seviyesi';
 $lang['Miscellaneous'] = 'Karışık';
Index: /trunk/language/uk_UA/admin.lang.php
===================================================================
--- /trunk/language/uk_UA/admin.lang.php	(revision 12929)
+++ /trunk/language/uk_UA/admin.lang.php	(revision 12930)
@@ -376,5 +376,4 @@
 $lang['Metadata synchronized from file'] = 'Метадані синхронізовані з файлу';
 $lang['min time'] = 'мін. час';
-$lang['Miniaturization parameters'] = 'Параметри мініатюрізації';
 $lang['Minimum privacy level'] = 'Мінімальний рівень приватності';
 $lang['Miscellaneous'] = 'Різне';
Index: /trunk/language/vi_VN/admin.lang.php
===================================================================
--- /trunk/language/vi_VN/admin.lang.php	(revision 12929)
+++ /trunk/language/vi_VN/admin.lang.php	(revision 12930)
@@ -348,5 +348,4 @@
 $lang['Photo unreachable or no support'] = 'Hình không đọc được hoặc định dạng không được hỗ trợ';
 $lang['GD version'] = 'Phiên bản GD';
-$lang['Miniaturization parameters'] = 'Tối thiểu hóa tham số';
 $lang['generated in'] = 'được tạo trong';
 $lang['Results of miniaturization'] = 'Kết quả tổi thiểu hóa';
Index: /trunk/language/zh_CN/admin.lang.php
===================================================================
--- /trunk/language/zh_CN/admin.lang.php	(revision 12929)
+++ /trunk/language/zh_CN/admin.lang.php	(revision 12930)
@@ -346,5 +346,4 @@
 $lang['Photo unreachable or no support'] = '不支持图片格式或无法显示';
 $lang['GD version'] = 'GD版';
-$lang['Miniaturization parameters'] = '缩略图参数';
 $lang['generated in'] = '产生于';
 $lang['Results of miniaturization'] = '缩略图结果';
Index: /trunk/language/zh_TW/admin.lang.php
===================================================================
--- /trunk/language/zh_TW/admin.lang.php	(revision 12929)
+++ /trunk/language/zh_TW/admin.lang.php	(revision 12930)
@@ -347,5 +347,4 @@
 $lang['Photo unreachable or no support'] = '不支持圖片格式或無法顯示';
 $lang['GD version'] = 'GD版';
-$lang['Miniaturization parameters'] = '縮略圖參數';
 $lang['generated in'] = '產生於';
 $lang['Results of miniaturization'] = '縮略圖結果';
Index: /trunk/themes/default/template/comment_list.tpl
===================================================================
--- /trunk/themes/default/template/comment_list.tpl	(revision 12929)
+++ /trunk/themes/default/template/comment_list.tpl	(revision 12930)
@@ -1,11 +1,21 @@
-{* $Id$ *}
+{if isset($comment_derivative_params)}
+{strip}{html_style}
+.thumbnailCategory DIV.illustration{ldelim}
+	width: {$comment_derivative_params->max_width()+5}px;
+}
+
+.content .thumbnailCategory .description{ldelim}
+	height: {$comment_derivative_params->max_height()+5}px;
+}
+{/html_style}{/strip}
+{/if}
 <ul class="thumbnailCategories">
 {foreach from=$comments item=comment name=comment_loop}
 <li>
 	<div class="thumbnailCategory {if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}">
-	{if isset($comment.TN_SRC)}
+	{if isset($comment.src_image)}
 	<div class="illustration">
 		<a href="{$comment.U_PICTURE}">
-		<img src="{$comment.TN_SRC}" alt="{$comment.ALT}">
+		<img src="{$pwg->derivative_url($derivative_params, $comment.src_image)}" alt="{$comment.ALT}">
 		</a>
 	</div>
Index: /trunk/themes/default/template/comments.tpl
===================================================================
--- /trunk/themes/default/template/comments.tpl	(revision 12929)
+++ /trunk/themes/default/template/comments.tpl	(revision 12930)
@@ -74,5 +74,5 @@
 {if isset($comments)}
 <div id="comments">
-	{include file='comment_list.tpl'}
+	{include file='comment_list.tpl' comment_derivative_params=$derivative_params}
 </div>
 {/if}
Index: /trunk/themes/default/theme.css
===================================================================
--- /trunk/themes/default/theme.css	(revision 12929)
+++ /trunk/themes/default/theme.css	(revision 12930)
@@ -684,13 +684,4 @@
 }
 
-/* Set some sizes according to your maximum thumbnail width and height */
-.thumbnailCategory DIV.illustration {
-  width: 140px;      /* max thumbnail width + 2px */
-}
-
-.content .thumbnailCategory .description {
-  height: 140px;    /* max thumbnail height + 2px */
-}
-
 /* Set defaults for thumbnails legend */
 .thumbnails SPAN.thumbLegend {
