Streamline Your Photo Management with Immich-Go (with examples)
Immich-Go is an open-source tool that facilitates the transfer of extensive photo collections to a self-hosted Immich server. Designed to handle large-scale uploads, it enhances the user experience by simplifying the process of importing, organizing, and managing photos efficiently. With features like album creation and duplication removal, it serves as a comprehensive solution for maintaining a well-organized photo library.
Use case 1: Upload a Google Photos takeout file to Immich server
Code:
immich-go -server=server_url -key=server_key upload path/to/takeout_file.zip
Motivation: This use case addresses the challenge of migrating photos from Google Photos to a personal Immich server. Users often have large collections archived in takeout files from Google Photos, and efficiently uploading these to the Immich server ensures a seamless transition, eliminating reliance on third-party storage solutions.
Explanation:
-server=server_url
: Specifies the URL of the target Immich server where the photos will be uploaded.-key=server_key
: Provides the authentication key required to verify access to the server, ensuring secure transactions.upload
: The command that initiates the action of transferring files to the server.path/to/takeout_file.zip
: Indicates the local file path of the Google Photos takeout zip file that needs to be uploaded to the server.
Example output: Upon successful execution, the tool displays an upload progress summary indicating the file sizes and count of photos successfully transferred to the Immich server.
Use case 2: Import photos captured in June 2019, while auto-generating albums
Code:
immich-go -server=server_url -key=server_key upload -create-albums -google-photos -date=2019-06 path/to/takeout_file.zip
Motivation: This use case is motivated by the need to organize photos chronologically within albums for easier navigation and retrieval. Users with expansive photo libraries can benefit vastly by automating album creation based on time periods, reducing manual organization tasks significantly and ensuring a systematic photo management process.
Explanation:
-server=server_url
: The server URL for directing the upload process.-key=server_key
: The necessary key for authentication to access server functions securely.upload
: Initiates the upload process.-create-albums
: Enables automatic generation of albums based on specified criteria, consolidating photos captured within the same timeframe into distinct albums.-google-photos
: Instructs the tool to process the import with Google’s photo formats and metadata in mind.-date=2019-06
: Filters and uploads only the photos captured in June 2019 from the zip file, avoiding unnecessary uploads and focusing on the specified timeframe.
Example output: Once executed, the system reports the successful creation of albums labeled with appropriate descriptive tags, corresponding to the date specified.
Use case 3: Upload a takeout file using server and key from a config file
Code:
immich-go -use-configuration=~/.immich-go/immich-go.json upload path/to/takeout_file.zip
Motivation: This use case caters to users who prefer a streamlined setup procedure, minimizing repetitive input of server details by utilizing configuration files. Managing server connections centrally ensures consistency and reduces potential errors attributed to manual entry.
Explanation:
-use-configuration=~/.immich-go/immich-go.json
: Defines the path to the JSON configuration file that contains pre-set server URL and key parameters.upload
: Executes the command to commence the upload process.path/to/takeout_file.zip
: The designated photo takeout file to be transferred using configuration file credentials.
Example output: Successful uploads result in confirmation messages, with the benefit of user-preserved bandwidth since configuration files automate the process, ensuring settings are correctly applied without user intervention.
Use case 4: Examine Immich server content, remove less quality images, and preserve albums
Code:
immich-go -server=server_url -key=server_key duplicate -yes
Motivation: This use case addresses the desire for maintaining only the highest quality images within servers, particularly beneficial for users with limited storage capacities. It ensures albums remain intact while duplicates or inferior images are removed, optimizing storage utilization.
Explanation:
-server=server_url
: Specifies the server to be accessed for duplication examination.-key=server_key
: Provides the requisite security key for authorized access.duplicate
: Commands a check-and-remove process for duplicate or lower-quality images.-yes
: Automatically confirms and proceeds with the removal operation, negating manual approval prompts for a quicker, streamlined process.
Example output: Execution results in detailed logs of duplicate images found and removed, preserving the integrity of existing albums. Users benefit from a decluttered, quality-focused photo repository.
Use case 5: Delete all albums created with the pattern “YYYY-MM-DD”
Code:
immich-go -server=server_url -key=server_key tool album delete \d{4}-\d{2}-\d{2}
Motivation: The use case targets users who wish to declutter or reorganize their album structures by removing date-based albums that might be redundant or irrelevant. Providing a method to batch delete albums based on a regex pattern enables efficient management of album directories.
Explanation:
-server=server_url
: Directs operations to the specified Immich server.-key=server_key
: Ensures only authorized personnel can execute modifications on the server.tool
: Specifies access to server management tools.album delete
: Indicates the operation focuses on removing albums from the server.\d{4}-\d{2}-\d{2}
: Regular expression pattern matching albums labeled in a year-month-day format, allowing bulk deletion.
Example output: The command will generate a list of affected albums, subsequently deleting those matching the given pattern, confirmed by a status update post-operation, ensuring all specified albums are successfully removed.
Conclusion:
Immich-Go is an adaptable, user-friendly command-line tool that enhances the capabilities of managing and organizing extensive photo collections on a self-hosted Immich server. It offers robust solutions tailored for efficient uploads, insightful examination of server content, and strategic album management strategies. Users can maximize their photo storage management while maintaining the accessibility and integrity of their photographic memories through the use of Immich-Go.