Configuring preview images

# Custom previews directory

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

<?php
  // set previews dir to custom value
  $dsg_previews_dir = 'previews_folder';
?>
...
<?php include 'dsg.php'; ?>

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

# Setting custom preview dimensions

By default the preview is scaled to contain within a 800 x 700 px box, while preserving it's ratio. Which means that a landscape 2592 x 1936 px, 5 Mpix original image will result in 800 x 598 px preview, whereas a portrait 1936 x 2592 px, 5 Mpix original image will result in 523 x 700 px preview.

You can change the box dimensions by setting $dsg_preview_width and $dsg_preview_height variables:

<?php
  // change default preview dimensions box
  $dsg_preview_width = 1024;
  $dsg_preview_height = 768;
?>
...
<?php include 'dsg.php'; ?>