Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

4 Thumbnail Directory

For every user, there must be exactly one place where all generated thumbnails are stored. This thumbnails directory is located in the user's XDG Cache Home, as defined by the XDG Base Directory Specification (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html). Namely, if the environment variable $XDG_CACHE_HOME is set and not blank then the directory $XDG_CACHE_HOME/thumbnails will be used, otherwise $HOME/.cache/thumbnails will be used.

4.1 Directory Structure

The thumbnails directory will have the following internal structure:

$XDG_CACHE_HOME/thumbnails/
$XDG_CACHE_HOME/thumbnails/normal
$XDG_CACHE_HOME/thumbnails/large/
$XDG_CACHE_HOME/thumbnails/x-large/
$XDG_CACHE_HOME/thumbnails/xx-large/
$XDG_CACHE_HOME/thumbnails/fail/

The meaning of the directories are as follows:

  • Normal: The default place for storing thumbnails. The image size must not exceed 128x128 pixel. Programs which need smaller resolutions should read and write the 128x128 thumbnails and downscale them afterwards to the desired dimension. See Thumbnail Creation for more details.

  • Large: The previous notes apply to this directory too, except that the thumbnail size must be 256x256 pixel.

  • Extra Large: The previous notes apply to this directory too, except that the thumbnail size must be 512x512 pixel.

  • Extra extra Large: The previous notes apply to this directory too, except that the thumbnail size must be 1024x1024 pixel.

  • Fail: This directory is used to store information about files where a thumbnail couldn't be generated. See Thumbnail Generation Failure for more details.

Note
Note

You must not create/save thumbnails for any files you will find in these directories. Instead load and use these files directly.