sidecar files
darktable is a non-destructive image editor and opens all images in read-only mode. Most data created within darktable (metadata, tags, and image processing steps) is stored in separate XMP and DTDATA sidecar files. These files are stored alongside the original Raw files and allow darktable to store information about the images as well as the full editing history without touching the original raw files. When you import an image into darktable for the first time, an XMP file is automatically generated. The generation of sidecar files can be disabled in preferences > storage > XMP sidecar files but this is not recommended in normal use.
When configured to use XMP sidecar files, darktable may also store some data in DTDATA sidecar files.
Note: custom sort sequence numbers are not stored in sidecar files. This could be destructive if imported into another darktable image library – including their original library – after import, duplication, or image resequencing.
For a given source image, multiple editing versions, called duplicates, can co-exist, sharing the same input image data but each having their own metadata, tags and processing steps. Each duplicate of a given image (named <basename>.<extension) is represented by separate sidecar files (with a filename constructed in the form <basename>_<number>.<extension>.<xmp or dtdata>, where <number> represents the version number of that edit). Information for the initial edit – the “duplicate” with version number zero – is stored in the sidecar file named <basename>.<extension>.xmp. The version number of each duplicate is displayed in the image information module in each of darktable’s views.
Your work is automatically synchronised to the sidecar files without the need to press a “save” button. When backing up your data, make sure that you also retain copies of the XMP files, as these are required to fully reconstruct your work in case of a disaster.
In addition to the sidecar files, darktable keeps all image-related data (apart from the DTDATA information) in its library database for fast access. An image can only be viewed and edited from within darktable if its data has first been loaded into the library database. This happens automatically when you first import an image. If an image is subsequently re-imported, the database will be updated from the contents of its XMP file.
Once an image has been imported into darktable, the database entries take precedence over the XMP file. Subsequent changes to the XMP file by any other software are not visible to darktable – such changes will be overwritten the next time darktable synchronizes the file. On request, darktable can be configured to search for updated XMP files at startup, offering a choice to update the database or overwrite the XMP file where changes are identified. This configuration can be changed in preferences > storage > XMP sidecar files.
To import XMP sidecar files created by other applications, see importing sidecar files generated by other applications.
To load an XMP sidecar file (e.g. one received from another darktable user), see load sidecar file.
🔗drag and drop XMP sidecar files
You can drag and drop XMP sidecar files to the current image in the darkroom. The message drop XMP sidecar files here to apply edits will be displayed. On releasing the mouse button, a dialog will be displayed with options, which depend on the number of files being dragged:
🔗single sidecar file
- cancel
- cancels without making any changes.
- create duplicate
- create a new duplicate of the current image using the history stack in the dragged file.
- replace history
- replaces the history stack of the current image with the history stack in the dragged file.
🔗multiple sidecar files
- cancel
- cancels without making any changes.
- create
- creates new duplicates of the current image using the history stack in the dragged files, one per sidecar file.
🔗DTDATA sidecar files
If the creation of sidecar files is enabled in preferences > storage > XMP sidecar files then, in addition to the XMP sidecar files, darktable will store additional data in DTDATA sidecar files.
The DTDATA sidecar holds per-pixel edit data such as raster masks. It is only created for images that use such data, and only when sidecar writing is enabled; most images never get one. It follows the image when it is moved, duplicated or deleted using darktable.