Skip to content

Immich export plugin via Immich API - #704

Draft
daniel-nicolai-hansten wants to merge 1 commit into
darktable-org:masterfrom
daniel-nicolai-hansten:master
Draft

Immich export plugin via Immich API#704
daniel-nicolai-hansten wants to merge 1 commit into
darktable-org:masterfrom
daniel-nicolai-hansten:master

Conversation

@daniel-nicolai-hansten

@daniel-nicolai-hansten daniel-nicolai-hansten commented Aug 2, 2026

Copy link
Copy Markdown

Immich export plugin, rewrite of #542

USAGE
This plugin allows you to upload selected photos to an Immich server (https://immich.app/)
Each image is tracked with darktable tags so re-exporting is safe and cheap:

  • an "immich|asset|" tag remembers the uploaded asset id for that image
  • an "immich|change|" tag remembers the darktable change timestamp at export time
    If an image's change timestamp still matches the cached tag and "Skip unchanged" is
    enabled, the export is skipped locally without contacting the Immich server at all.
    Otherwise the plugin looks up the cached asset on the server; if it no longer exists
    there, or has been trashed, it is treated as gone and the image is uploaded fresh.
    When the cached asset is still present, the "Re-export Behavior" option controls what
    happens to it: delete/trash it, stack the new upload with it, both, or leave it alone
    and upload the image as a new, separate asset.

Album assignment is controlled by the "Album mode" option:

  • No album: exported assets are not added to any album
  • Custom / Copy existing + Custom: assets are added to the album named in the "Album Title" field
  • Copy albums from existing asset: assets are added to whatever albums the previous
    version of the asset already belonged to on the server
  • Use Album Title: same as Custom, using the "Album Title" field as the album name
    The "Album Title" field is prefilled with the folder name of the exported image when
    a title-based mode is selected, but can be edited freely.

In the lua options you must specify:

  • the hostname of the server immich
  • an api key generated in the Account settings - API Keys menu of the immich server
    The lua options also let you set the defaults for "Album mode", "Skip unchanged", and
    "Re-export Behavior" shown above, so the export panel opens with your preferred choices.
    An "Immich debug logging" option is also available there to log every request/response
    to the darktable debug log, which is useful when troubleshooting a failed upload.

Adds a new export storage target that uploads selected images to an
Immich server (https://immich.app/) via its REST API.

* Tracks uploads with darktable tags ("immich|asset|<id>" and
  "immich|change|<timestamp>") so re-exporting is cheap: unchanged
  images can skip contacting the server entirely when "Skip unchanged"
  is enabled.
* "Re-export Behavior" controls what happens to a previously uploaded
  asset when a changed image is re-exported: delete/trash it, stack
  the new upload with it, both, or upload as an independent new asset.
  A cached asset that no longer exists (or was trashed) on the server
  is treated as gone and the image is uploaded fresh.
* "Album mode" controls album assignment on export: no album, a
  custom/typed album title, copying the albums of the previous asset,
  or combinations of the two. The album title field is prefilled from
  the image's folder name.
* Lua preferences configure the server URL, API key, an optional Lua
  module install prefix (for platforms where darktable bundles its own
  Lua), defaults for the export options above, and a debug logging
  toggle for troubleshooting.
* Requires luasec, lua-cjson, and luasocket for darktable's Lua
  runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant