Fari
Fari
IImmich
Created by Fari on 3/29/2025 in #help-desk-support
Help locating the file in Docker
Hey all, I’m using the storage template feature to organize around 50k photos, and I'm currently appending assetIdShort to the end of each filename. The issue is that assetIdShort uses the last 12 characters of the asset UUID, but I'd like to shorten this to just 4 characters (e.g., asset.id.slice(-4)) — I only need this change temporarily for a one-time migration of my library. Here's the method I’m trying to update: File: server/src/services/storage-template.service.ts private render(template: HandlebarsTemplateDelegate<any>, options: RenderMetadata) { const { filename, extension, asset, albumName } = options; const substitutions: Record<string, string> = { filename, ext: extension, filetype: asset.type == AssetType.IMAGE ? 'IMG' : 'VID', filetypefull: asset.type == AssetType.IMAGE ? 'IMAGE' : 'VIDEO', assetId: asset.id, assetIdShort: asset.id.slice(-12), album: (albumName && sanitize(albumName.replaceAll(/\.+/g, ''))) || '', }; } I’m running Immich via Docker and couldn’t locate the source file in the container — I assume it’s compiled JS in production images. Has anyone successfully modified this or know where I can make this change (even if it's the compiled file)? Or do I need to clone the repo and rebuild the image locally? Any guidance would be appreciated!
8 replies