The stack command organizes related photos into stacks on your Immich server without uploading new content.
immich-go stack [options]Stacking groups related photos together for better organization:
- Burst photos from rapid shooting
- RAW + JPEG pairs from cameras that shoot both formats
- HEIC + JPEG pairs from iPhone/iPad Live Photos
- Epson FastFoto scan groups (original, corrected, back side)
| Option | Required | Description |
|---|---|---|
-s, --server |
Y | Immich server URL |
-k, --api-key |
Y | Your API key |
| Option | Default | Description |
|---|---|---|
--skip-verify-ssl |
false |
Skip SSL certificate verification |
--client-timeout |
20m |
Server call timeout |
--api-trace |
false |
Enable API call tracing |
| Option | Default | Description |
|---|---|---|
--dry-run |
false |
Simulate stacking without making changes |
--time-zone |
System | Override timezone for date operations |
| Option | Values | Description |
|---|---|---|
--manage-burst |
NoStack, Stack, StackKeepRaw, StackKeepJPEG |
How to handle burst sequences |
Detection Methods:
- Time-based: Photos taken within 900ms of each other
- Filename patterns: Device-specific naming conventions
Supported Devices:
- Huawei:
IMG_20231014_183246_BURST001_COVER.jpg,IMG_20231014_183246_BURST002.jpg - Google Pixel:
PXL_20230330_184138390.MOTION-01.COVER.jpg,PXL_20230330_184138390.MOTION-02.ORIGINAL.jpg - Samsung:
20231207_101605_001.jpg,20231207_101605_002.jpg - Sony Xperia:
DSC_0001_BURST20230709220904977.JPG,DSC_0035_BURST20230709220904977_COVER.JPG - Nexus:
00001IMG_00001_BURST20171111030039.jpg,00015IMG_00015_BURST20171111030039_COVER.jpg - Nothing:
00001IMG_00001_BURST1723801037429_COVER.jpg,00002IMG_00002_BURST1723801037429.jpg
| Option | Values | Description |
|---|---|---|
--manage-raw-jpeg |
NoStack, KeepRaw, KeepJPG, StackCoverRaw, StackCoverJPG |
Handle RAW+JPEG pairs |
- NoStack: Leave files separate
- KeepRaw: Delete JPEG, keep RAW only
- KeepJPG: Delete RAW, keep JPEG only
- StackCoverRaw: Stack with RAW as cover image
- StackCoverJPG: Stack with JPEG as cover image
| Option | Values | Description |
|---|---|---|
--manage-heic-jpeg |
NoStack, KeepHeic, KeepJPG, StackCoverHeic, StackCoverJPG |
Handle HEIC+JPEG pairs |
Same logic as RAW+JPEG but for HEIC format files.
| Option | Default | Description |
|---|---|---|
--manage-epson-fastfoto |
false |
Stack Epson FastFoto scan groups |
File Pattern:
image-name.jpg(Original scan)image-name_a.jpg(Corrected scan)image-name_b.jpg(Back of photo)
When enabled, stacks all three with corrected scan as cover.
# Stack burst photos automatically
immich-go stack \
--server=http://localhost:2283 \
--api-key=your-key \
--manage-burst=Stack
# Preview stacking without changes
immich-go stack \
--server=http://localhost:2283 \
--api-key=your-key \
--manage-burst=Stack \
--dry-run# Stack with RAW as cover
immich-go stack \
--server=http://localhost:2283 \
--api-key=your-key \
--manage-raw-jpeg=StackCoverRaw
# Keep only JPEG files
immich-go stack \
--server=http://localhost:2283 \
--api-key=your-key \
--manage-raw-jpeg=KeepJPG# Handle all photo types
immich-go stack \
--server=http://localhost:2283 \
--api-key=your-key \
--manage-burst=Stack \
--manage-raw-jpeg=StackCoverRaw \
--manage-heic-jpeg=StackCoverJPG \
--manage-epson-fastfoto=true# Test stacking rules without changes
immich-go stack \
--server=http://localhost:2283 \
--api-key=your-key \
--manage-burst=Stack \
--manage-raw-jpeg=StackCoverRaw \
--dry-run- Filename patterns (device-specific)
- Time-based detection (900ms threshold)
- Exact name matching (different extensions)
- Same directory location
- Similar timestamps (within reasonable range)
Always use --dry-run to preview changes:
immich-go stack --dry-run --manage-burst=Stack --server=... --api-key=...Handle one type at a time:
# First, handle bursts
immich-go stack --manage-burst=Stack --server=... --api-key=...
# Then, handle RAW+JPEG
immich-go stack --manage-raw-jpeg=StackCoverRaw --server=... --api-key=...Consider using the archive command before major organization:
immich-go archive from-immich --write-to-folder=/backup --server=... --api-key=...Use logging to track operations:
immich-go stack \
--log-level=DEBUG \
--log-file=/tmp/stacking.log \
--manage-burst=Stack \
--server=... --api-key=...- Check photo timestamps and filenames
- Verify photos are from supported devices
- Use
--api-traceto see server communication - Try
--dry-runwith--log-level=DEBUG
- Review detection logic for your device type
- Check if time-based detection is too aggressive
- Use filename patterns for specific device types
- Increase
--client-timeoutfor large libraries - Process in smaller batches by date range (using archive/upload workflow)
- Upload Command - Stacking during upload
- Technical Details - Detection algorithms
- Best Practices - Organization strategies