Index: /extensions/Fotorama/admin.php
===================================================================
--- /extensions/Fotorama/admin.php	(revision 29927)
+++ /extensions/Fotorama/admin.php	(revision 29928)
@@ -20,4 +20,5 @@
     'resize' => isset($_POST['resize']),
     'info_button' => isset($_POST['info_button']),
+    'square_thumb' => isset($_POST['square_thumb']),
     );
   if (isset($_POST['allowfullscreen']))
Index: /extensions/Fotorama/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Fotorama/language/en_UK/plugin.lang.php	(revision 29927)
+++ /extensions/Fotorama/language/en_UK/plugin.lang.php	(revision 29928)
@@ -22,4 +22,5 @@
 $lang['milliseconds'] = 'milliseconds';
 $lang['Add image info button'] = 'Add image info button';
+$lang['Thumbnail is a square (when present)'] = 'Thumbnail is a square (when present)';
 
 ?>
Index: /extensions/Fotorama/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/Fotorama/language/ru_RU/plugin.lang.php	(revision 29927)
+++ /extensions/Fotorama/language/ru_RU/plugin.lang.php	(revision 29928)
@@ -22,4 +22,5 @@
 $lang['milliseconds'] = 'миллисекунд';
 $lang['Add image info button'] = 'Добавить кнопку информации об изображении';
+$lang['Thumbnail is a square (when present)'] = 'Квадратные миниатюры (когда присутствуют)';
 
 ?>
Index: /extensions/Fotorama/main.inc.php
===================================================================
--- /extensions/Fotorama/main.inc.php	(revision 29927)
+++ /extensions/Fotorama/main.inc.php	(revision 29928)
@@ -56,4 +56,5 @@
 	$conf['Fotorama']['period'] = 4000;
     $conf['Fotorama']['info_button'] = false;
+    $conf['Fotorama']['square_thumb'] = true;
   }
 }
@@ -142,6 +143,13 @@
         $row['derivative_big'] = $row['src_image'];
       }
-//      $row['derivative_thumb'] = DerivativeImage::get_one(IMG_SQUARE, $row['src_image']);
-      $thumb_params = ImageStdParams::get_custom($conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight'], 1, $conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight']);
+
+      if ($conf['Fotorama']['square_thumb'])
+      {
+        $thumb_params = ImageStdParams::get_custom($conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight'], 1, $conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight']);
+      }
+      else
+      {
+        $thumb_params = ImageStdParams::get_custom(9999, $conf['Fotorama']['thumbheight']);
+      }
       $row['derivative_thumb'] = new DerivativeImage($thumb_params, $row['src_image']);;
       if ($row['derivative_thumb'] == null)
Index: /extensions/Fotorama/maintain.inc.php
===================================================================
--- /extensions/Fotorama/maintain.inc.php	(revision 29927)
+++ /extensions/Fotorama/maintain.inc.php	(revision 29928)
@@ -27,4 +27,5 @@
     'period' => 4000,
     'info_button' => false,
+    'square_thumb' => true,
   );
 
Index: /extensions/Fotorama/template/admin.tpl
===================================================================
--- /extensions/Fotorama/template/admin.tpl	(revision 29927)
+++ /extensions/Fotorama/template/admin.tpl	(revision 29928)
@@ -94,4 +94,10 @@
     </label>
     <input type="number" size="2" maxlength="3" name="thumbheight" id="thumbheight" value="{$Fotorama.thumbheight}" min="5" max="300" style="width: 50px;">&nbsp;px
+  </li>
+  <li>
+    <input type="checkbox" id="square_thumb" name="square_thumb"{if $Fotorama.square_thumb} checked="checked"{/if}>
+    <label for="square_thumb">
+      <b>{'Thumbnail is a square (when present)'|translate}</b>
+    </label>
   </li>
   <li>
Index: /extensions/Fotorama/template/fotorama-content.tpl
===================================================================
--- /extensions/Fotorama/template/fotorama-content.tpl	(revision 29927)
+++ /extensions/Fotorama/template/fotorama-content.tpl	(revision 29928)
@@ -21,4 +21,6 @@
     data-full="{$thumbnail.derivative_big->get_url()}" data-url="{$thumbnail.url}" data-caption="{$thumbnail.TITLE}"
     {if $Fotorama.nav == 'thumbs' || $Fotorama.fullscreen_nav == 'thumbs'}data-thumb="{$thumbnail.derivative_thumb->get_url()}"{/if}>
+    {assign var=thumb_size value=$thumbnail.derivative_thumb->get_size()}
+    {if !$Fotorama.square_thumb}<img width="{$thumb_size[0]}" height="{$thumb_size[1]}">{/if}
   </a>
 {/foreach}
