Configuring thumbnail images

# Custom thumbnails directory

Dead Simple Gallery will create that folder inside your gallery folder, for storing cached thumbnails. For custom thumbnails folder use $dsg_thumbs_dir variable:

<?php
  // set thumbs dir to custom value
  $dsg_thumbs_dir = 'thumbs_folder';
?>
...
<?php include 'dsg.php'; ?>

Now Dead Simple Gallery script will use this value to create thumbs_folder inside your gallery directory.

# Setting custom thumbnail dimensions

Default thumbnail dimensions are 210 x 140 px, you can change them by setting $dsg_thumb_width and $dsg_thumb_height variables:

<?php
  // change default thumbnail dimension
  $dsg_thumb_width = 140;
  $dsg_thumb_height = 90;
?>
...
<?php include 'dsg.php'; ?>

# Changing thumb creation operation to scale

Image thumbnails by default will be (scaled down and then) cropped to get nice consistent thumbnail sizes. If you prefer to preserve full image view without cropping, you can set the thumbnails to be scaled down to contain inside a box, by setting $dsg_thumb_operationvariable to 'scale':

<?php
  // create thumbnails by scaling instead of cropping
  $dsg_thumb_operation = 'scale';
?>
...
<?php include 'dsg.php'; ?>

That works well combined with custom thumb size (which will now specify target box size):

<?php
  // create thumbnails by scaling instead of cropping
  $dsg_thumb_operation = 'scale';

  // change thumb target box dimensions
  $dsg_thumb_width = 200;
  $dsg_thumb_height = 200;
?>
...
<?php include 'dsg.php'; ?>