This article describes the different types of image versions in Gallery 2 and how to manage them.
Gallery 2 (G2) shows the images that you've uploaded on your website. Additionally, G2 generates small preview images, so called thumbnails, for all images that you upload. If you haven't changed the theme settings yet, then G2 will show up to 9 of these thumbnails on a preview page (album page).
If you then click on one of these thumbnails, G2 will show you a larger version of the image along with the image name, description and other details. If you haven't changed the settings yet, then you will see a downsized / intermediate sized version of the image that you have uploaded, a so called resized image or resize. You can configure an unlimited number of intermediate sized images and a list of all available versions of this image is in the upper right corner of the (photo) page.
In the upper right corner you should see a link to the full-size image, that's the original image that was uploaded to Gallery 2 in its full size.
If the original image is in a non-webviewable format (tiff, wmf, tga, ...), then you should also see a download link to download the original image. In this case, the full-sized image is a web-viewable image (JPEG format) of the same dimensions as the non-web-viewable original image.
Note that this behavior of what you see where and what happens when you click thumbnails, resizes etc. is all up to the theme that you're using. Here we describe the behavior of the default theme (matrix).
Gallery 2 will only generate thumbnails and resizes if at least one of the image toolkit modules is active (imagemagick, netpbm, gd, ...).
Also, not all image toolkits can handle all image formats. ImageMagick supports the widest range of image formats. It can even generate thumbnails and resizes for PDF documents, eps graphics, etc.
Note that your imagemagick/gd/netpbm might not support the full list of the file types that G2 supports. It depends on how your imagemagick/netpbm binaries or gd library/php was compiled.
For a full list of supported file types please see: Supported MIME Types
For site-wide default settings, browse to your root album and click Edit Album and click on the Album tab.
The aspect ratio of the generated thumbnail will be the same as the one of the original full-size image. If your original image has the ratio 4:3 of width to height and you chose 160 as the thumbnail size, then your thumbnail will have the dimensions 160 pixel in width and 120 pixel in height.
If the squarethumb module is active, all thumbnails will be generated with square dimensions, that is their width is the same as their height, independently of the aspect ratio of the original.
The aspect ratio of the generated thumbnail will be the same as the one of the original full-size image. The dimensions you enter for the resize version are maximums in pixels for the width and the height.
The dimensions of the original full-size image are unchanged unless you explicitly change them. If you deal with 8 MegaPixel images from your latest digital camera, you might want to resize (down size/down sample) the images before you upload them to G2 to save bandwidth and webspace.
Changing existing thumbnail and resize sizes in G2.0/2.0.1/2.0.2 is a pain. You have to go to each album, one by one, and edit the settings there.
In G2.1 and later versions (and in the current nightly snapshots) you can change the settings recursively if you want to. That is, if you want to change the thumbnail size for all albums, browse to your root album, click Edit Album and then change the settings with the Use this thumbnail size in all subalbums checkbox ticked.
The new settings are only used for new images, that is, for images that will be added to this album in future. The thumbnails and resizes of existing images will not be changed unless you tick the Recreate thumbnails and Recreate resized images checkboxes respectively.
You don't have to bother about generating thumbnails and resizes. They are generated automatically when they are needed. Since generating images is computationally expensive (it takes a moment to create a thumbnail or resize) you may want to have complete control on when exactly these images are generated.
A few add item methods (e.g. add item -> from browser) offer the Create thumbnails now in the upload view which forces G2 to generate the thumbnails right when the image is added and not later when it is first used. There is no such option for resizes yet.
You can force to generate / build all thumbnails and resizes of the whole installation by browsing to Site Admin -> Maintenance -> Build all thumbnails/resizes. This task can take hours if you have thousands of images, but it can also finish in a few seconds for only a few images if your server is fast enough. Note that during the execution of this task your server will be slowed down considerably. You may also want to put G2 into maintenance mode (see config.php) during this operation.
Thumbnails and resizes are not generated on each request. That would be too slow. Instead they are generated when they are first requested and then they are stored on the harddisk of your server. Note that thumbnails and resizes are derived from the original, thus we call them internally derivatives. That's why they are stored in cache/derivative/ in your G2 storage folder (usually g2data/).