* Migrate from npm to pnpm across entire project
• Update all GitHub workflow files to use pnpm instead of npm
• Replace npm commands with pnpm equivalents in devcontainer scripts
• Remove package-lock.json files and update to use pnpm-lock.yaml
• Consolidate node version references to use server/.nvmrc
* Refine pnpm migration based on review feedback
• Replace SKIP_SHARP_FILTERING with SHARP_IGNORE_GLOBAL_LIBVIPS environment variable
• Improve Sharp package filtering to include specific Linux architectures for Docker builds
• Optimize Dockerfile dependency caching with improved layer structure
• Clean up workspace configuration and remove redundant settings
* Address additional review feedback for pnpm migration
• Fix node-version-file paths in GitHub workflow configurations
• Refactor .pnpmfile.cjs to use switch statement for better code organization
• Correct cache type typo in fix-format workflow
• Simplify Vite configuration by merging configs inline
• Update package description for consistency
* Use 'server/.nvmrc' for fix-format.yml GHA
* Delete npm locks
* Remove Docker volume isolation for node_modules directories
• Remove volume mounts for node_modules and related directories
• Allow shared access between host and container filesystem
• Update init container to handle file ownership with conditional existence check
* Remove unused Docker volumes and volume mounts
• Remove node_modules volume mounts from devcontainer configuration
• Remove unused named volumes for pnpm-store, node_modules, and cache directories
• Clean up Docker Compose configuration after removing volume isolation
* Fix typescript-sdk package issues
• Remove unknown "build" dependency that was incorrectly added to package.json
• Update pnpm-lock.yaml to reflect dependency removal
* Add pnpm setup to mobile workflow for translation formatting
• Add pnpm action setup step to mobile unit tests workflow
• Required for translation file formatting and sorting operations
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* feat(mobile): shared album activities
* add like buttons and fix behavior of unliking
* fix: conditionally show activity button and fix title truncations
* fix(mobile): newest/oldest album sort (#20743)
* fix(mobile): newest/oldest album sort
* chore: use sqlite to determine album asset timestamps
* Fix missing future
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix: async handling of sort
* chore: tests
* chore: code review changes
* fix: use created at for newest asset
* fix: use localDateTime for sorting
* chore: cleanup
* chore: use final
* feat: loading indicator
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(mobile): newest/oldest album sort
* chore: use sqlite to determine album asset timestamps
* Fix missing future
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix: async handling of sort
* chore: tests
* chore: code review changes
* fix: use created at for newest asset
* fix: use localDateTime for sorting
* chore: cleanup
* chore: use final
* feat: loading indicator
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
The height of the search results element was unrestricted, which meant that the
asset visibility calculations were completely incorrect. The consequence of
this is that assets which should not have been visible, were. In practical
terms, all assets below the viewport were rendered when they shouldn't have
been which is terrible for performance. Limiting the height of the viewport
fixes that calculation and assets are correctly hidden.
The consequence of limiting the height of the viewport is that the intersector
then incorrectly thought the scroll position was always at the end. This has
been fixed by calculating the position of sliding window against the calculated
asset layout container height.
Co-authored-by: Alex <alex.tran1502@gmail.com>
The thumbhash had a z-index setting which meant it would cover the search bar,
and would always cause weird animations when scrolling up in search results.
This is fixable by removing the z-index and moving it in front the other
elements to get a naturally higher higher z-index preference.
The contents of search results are slightly offset by the search bar, search
terms and spacing (margins/padding), and needs to be factored in when
calculating whether an asset is visible or not. The offset was 0, which
meant that assets were removed from view too early.
The timeline has been quite aggressive with scrolling to assets, even if they
were right in the middle of the page. If the asset is visible, then we
shouldn't scroll to it. It's really confusing when assets jump around after
being viewed.
* feat: use drift for logging
* fix: tests
* feat: use the truncate limit from constants.ts as default
* chore: move setupAll to top level and restructure
* chore: code review changes
* fix: inherits
* feat: raise log line limit to 2000
* limit getAll to 250 lines
* delete DLog and make LogRepository not a singleton
* fix: drift build settings and `make migration`
* fix: tests
* remove sensitive log
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
The search results page can become unstable with large amounts of assets, and
has therefore been limited to displaying just 5000 assets. This limit is
arbitrary and may be too restrictive.
fix video thumbnail generation for short videos
ffmpeg gives conversion failed with error 234 for short mp4 files (less
than 10s) that where converted from m2ts. Longer videos work fine.
It looks like ffmpeg has no frames left to use for generating a
thumbnail.
This change fixes this issue and seems to not change the behaviour for
other mp4 files (same thumbnail before and after change)
This might also fix all mts file thumbnail generation.
* feat: remove from album in asset viewer bar
* chore: move button to bottom bar instead of bottom sheet
* move back to bottom sheet
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix: expand sheet when album search is focused
* convert GeneralBottomSheet to ConsumerStatefulWidget
* fix: cleaning up
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(mobile): disable memory lane when memories are disabled
* Update main_timeline.page.dart
* fix: formatting
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix: use storageIndicator setting for beta timeline
* fix: reactively update the storage indicator icons when setting is changed
* Update drift_trash.page.dart
* override to bool for storageIndicator
- App will now kick off hashing after local sync if the lifecycle is in resumed or active state
- We now wait for hashing to complete before we kick off the upload process
* fix_Exlif_Metadata_Rating_Rounding_to_Interger
Rounding Exlif Rating Interger
Images support having numbers other than integers for the rating metadata in EXLIF. The database expects it to be an integer though. Trying to upload an image that has a rating other than an integer results in it failing to parse the image and defaulting to showing a corrupted file icon.
Rather than changing the database type, I would like to round the rating to the nearest integer so that Immich works with images that have a rating like this in their metadata.
* Changing Metadata validateRange to always round.
* Update server/src/services/metadata.service.ts
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
---------
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
* feat: drift edit time and date action
* feat: add edit button on asset viewer bottom sheet
* update localDateTime column in addition to createdAt to keep consistency
* fix: dont update local dateTime
Server calcs this anyway and it will be synced when the change is applied. We don't use localDateTime on mobile so there is no reason to update this value
* fix: padding around edit icon in ListTile
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
* chore: format
* fix: hide date edit control when asset does not have a remote
* fix: pull timezones correctly from image
---------
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
* fix(download): handle completed downloads and refresh albums
* fix(download): remove use of outdated AlbumService
---------
Co-authored-by: Peter Ombodi <peter.ombodi@gmail.com>
* fix user icons in album view
* revert updateUsersV1 change
* fix: UserDto merge issues
* fix: update user entity
* revert what I thought were merge issues
turns out drift cant figure out when it needs to gen a file...
* fix removed line
* handle defaults for older servers
* feat: checkpoint migrations
* fix: use parenthesis instead of brackets
* Update 1753800911775-ProfileImageCheckpointRemoval.ts
* fix: sync stream updateUsersV1
Fix the calculation for the date group width, so there's never a scenario where photos will be hidden. On mobile devices, photos in the second row can sometimes have a top of <100px, which throws off the calculation of the date group width.
feat: Support config via Systemd Credentials
See https://systemd.io/CREDENTIALS/. This is used as a fallback, so will
only be used if the `$*_FILE` var is empty. This could also be used to
implicitly use Docker Secrets by settings
`CREDENTIALS_DIRECTORY=/run/secrets` rather than setting individual
`$_*FILE` environment variables.
* fix: android widget updates
* ensure periodic work is queued when we receive an update
This will not "reset the clock" on the periodic work since we are using ExistingPeriodicWorkPolicy.UPDATE. This is needed since existing widgets have already been asked to queue their workers. If those periodic workers were overwritten by a widget update request from the app, there is no way to queue them again. onReceive gets run when the app requests a widget update so the periodic workers will get queued again.
* Clarify in log why reverse geocoding may return nothing
* Decrease log level for empty reverse geocoding response from warn to log
* Use a named constant for 25km
* Mention fallback to countries in the message
* Improve natural earth log message
* Decrease log level for empty reverse geocoding response from natural earth countries
* chore: fix typo 'make_build' -> 'make build'
* chore: add missing 'make pigeon' instruction
Turns out I was getting bit by forgetting to run `make pigeon`, which
also generates files. Perhaps it would be better to make it part of
`make build`?
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
I ran into this while testing out
<https://github.com/immich-app/immich/pull/19830>. When I add, change,
or remove a client certificate under Immich's advanced settings, the
change wouldn't take effect until some mysterious point in the future.
For example:
1. Add a client certificate. It doesn't get used.
2. Remove certificate. *Now* the client certificate from step 1) is used.
3. Restart application. Now no client certificate is used.
This all boils down to some missing `await`s. The user would change the
cert, and we'd start asynchronously saving it to the store, and while
the save is still happening, [`HttpSSLOptions` pulls the "old" value out of
`SSLClientCertStoreVal`](https://github.com/immich-app/immich/blob/v1.136.0/mobile/lib/utils/http_ssl_options.dart#L30).
With the appropriate `await`s, this behaves much more sanely.
* show only local assets from albums selected for backup
# Conflicts:
# mobile/lib/infrastructure/repositories/db.repository.drift.dart
* ignore backup selection
* fix: backup album ownerId
* fix: backup album ownerId
* only show local only assets that are selected for backup
* add index on visibility and backup selection
* fix: video not playing in search view
* remove safe area from bottom bar
* refactor stack count with a CTE and local asset with a SELECT
* fix lint
* remove redundant COALESCE
* remove stack count from main timeline query
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* remove safe area from bottom bar
* fix: video not playing in search view
* stop foreground / background back on migration
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* - add component
- update server's StackCreateDto for merge parameter
- Update stackRepo to only merge stacks when merge=true (default)
- update web action handlers to show stack changes
* - make open-api
* lint & format
* - Add proper icon to 'remove from stack'
- change web unstack icon to image-off-outline
* - cleanup
* - format & lint
* - make open-api: StackCreateDto merge optional
* initial addition of new endpoint
* remove stack endpoint
* - fix up remove stack endpoint
- open-api
* - Undo stackCreate merge parameter
* - open-api typescript
* open-api dart
* Tests:
- add tests
- update assetStub.imageFrom2015 to have required stack attributes to include it with tests
* update event name
* Fix event name in test
* remove asset_update check
* - merge stack.removeAsset params into one object
- refactor asset existence check (no need for asset fetch)
- fix tests
* Don't return updated stack
* Create specialized stack id & primary asset fetch for asset removal checks
* Correct new permission names
* make sql
* - fix open-api
* - cleanup
* show beta sync stats
* show status next to jobs
* use drift devtools reset database impl
* dcm fixes
* fix: hash count
* styling
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat: add fileName to downloadOriginal response
* test: add fileName to ImmichFileResponse for downloadOriginal
* lint: use single quotes for fileName string in test
* wip
* wip widgets
* more wip changes
* latest changes
* working random widget
* cleanup
* add configurable widget
* add memory widget and cleanup of codebase
* album name handling
* add deeplinks
* finish minor refactoring and add some polish :)
* fix single shot type on random widget
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
* switch to ExposedDropdownMenuBox for random configure activity
* handle empty album and no connection edge cases
* android project cleanup
* fix proguard and gson issues
* fix deletion handling
* fix proguard stripping for widget model classes/enums
* change random configuration activity close to a checkmark on right side
---------
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
* feat: add toggle to switch between Isar and Sqlite
* reset sqlite on beta
* start sync on app open in new timeline
* fix lint
* migrate hashes when new timeline is selected
* migrate hashes immediately after beta is enabled
* show loading indicator in change timeline page
* some stylings
* fix some styling issue
* release resources on isolate close
* replace route and styling
* handle migration back to old timeline
* check if a provider is mounted before calling dispose on it
* styling
* styling and button
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* fix: _shouldUseLocalAsset check
* show storage indicators in local album view
* update local thumb provider to work with remote asset
* update checks
* do not show upload button when selection is only merged assets
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* prevent flashing white background in dark mode on page load/reload, tested with Safari and Chrome on macOS
* integrate into existing FOUC-prevention
---------
Co-authored-by: Evan <evan@MacBook-Pro.local>
* improvements to error handling, ability to select "Favorites" as a virtual album, fix widgets not showing image when tinting homescreen
* dont include isFavorite all the time
* remove check for if the album exists
this will never run because we default to Album.NONE and its impossible to distinguish between no album selected and album DNE (we dont know what the store ID is, only what iOS gives)
chore(deps): update dependency vite to v7 (#19657)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
* feat(mobile): drift place page
* merge main
* feat(mobile): drift place detail page (#19915)
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): hide storage indicator outside main timeline
* fix: lint
* set default as false
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* image thumbnail refactor
* minor const-ification in new thumbnail tile
* underscore helper classes
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* cache the last image an ios widget fetched and use if a fetch fails in a future timeline build
* code review fixes
* downgrade pbx for flutter
* use cache in snapshots
* feat: video player
* use remote asset id in local query
* fix: error from pre-caching beyond total assets
* fix: flipped local videos
* incorrect aspect ratio on iOS
* ignore other storage id during equals check
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* initial attempt at new guard
* do not resolve the route when replaced
* Update gallery_guard.dart comment
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* feat(mobile): drift local albums page
* fix: lint
* refactor: use AsyncValue
* fix: lint
* local album thumbnail
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): drift archive page
* fix: lint
* feat: include local indicator
* remove join in bucket
* remove showing local indicator in bucket
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: alex <alex@localhost-live.localdomain>
* reduce timeline rebuilds
* feat: adds bottom sheet map and actions (#19692)
* adds bottom sheet map and actions
* PR feedbacks
* only reload the asset viewer if asset is changed
* styling tweak
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* rename singleton and remove event prefix
* adds bottom sheet map and actions
* PR feedbacks
* refactor: use provider for viewer state
* feat: adds top and bottom app bar
* add safe area to bottom app bar
* change app and bottom bar color
* viewer - always have black background
* use the full width for the bottom sheet on landscape as well
* constraint the bottom sheet to not expand all the way
* add padding for location details in landscape
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* add full image provider and refactor thumb providers
* photo_view updates
* wip: asset-viewer
* fix controller dispose on page change
* wip: bottom sheet
* fix interactions
* more bottomsheet changes
* generate schema
* PR feedback
* refactor asset viewer
* never rotate and fix background on page change
* use photoview as the loading builder
* precache after delay
* claude: optimizing rebuild of image provider
* claude: optimizing image decoding and caching
* use proper cache for new full size image providers
* chore: load local HEIC fullsize for iOS
* make controller callbacks nullable
* remove imageprovider cache
* do not handle drag gestures when zoomed
* use loadOriginal setting for HEIC / larger images
* preload assets outside timer
* never use same controllers in photo-view gallery
* fix: cannot scroll down once swipe with bottom sheet
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(server): check additional exif date tags
- Add support for UTC date tags (GPSDateTime, DateTimeUTC, GPSDateStamp, SonyDateTime2)
- This matches tags that exiftool-vendored uses for tzSource in extractTzOffsetFromUTCOffset()
* Review comments
* nit
* review comments
* lots of tests for exif datetime
* missed
* format
* format again
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): add album asset sync
* add SyncAlbumToAssetDeleteV1 to openapi-spec
* update delete queries to use where in statements
* clear remote album when clear remote data
* fix: bad merge
* fix: bad merge
* fix: _SyncAckV1 return type
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: wuzihao051119 <wuzihao051119@outlook.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
wip: fix album asset exif and some other refactorings
feat: add album assets sync
feat: album to assets relation sync
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
* feat: sliver appbar
* feat: snapping segment
* Date label font size
* lint
* fix: scrollController reinitialize multiple times
* feat: tab navigation
* chore: refactor to private widget
* feat: new control bottom app bar
* bad merge
* feat: sliver control bottom app bar
Exit slideshow when exiting fullscreen.
Browsers do not send a keyboard event when exiting fullscreen, so if
the user exits fullscreen with the escape key, the slideshow
remains open, requiring another escape key press to close it. Fix this
by listening for the fullscreenchange event and closing the slideshow
when exiting fullscreen.
* fix: devcontainer perms
* Fix host based auth
* use path tricks to get to volume mount, but remain compat with current meaning of variables
* eureka, i think
* bit of cleanup
* feat: working widgets
* chore/feat: cleaned up API, added album picker to random widget
* album filtering for requests
* check album and throw if not found
* fix app IDs and project configuration
* switch to repository/service model for updating widgets
* fix: remove home widget import
* revert info.plist formatting changes
* ran swift-format on widget code
* more formatting changes (this time run from xcode)
* show memory on widget picker snapshot
* fix: dart changes from code review
* fix: swift code review changes (not including task groups)
* fix: use task groups to run image retrievals concurrently, get rid of do catch in favor of if let
* chore: cleanup widget service in dart app
* chore: format swift
* fix: remove comma
why does xcode not freak out over this >:(
* switch to preview size for thumbnail
* chore: cropped large image
* fix: properly resize widgets so we dont OOM
* fix: set app group on logout
happens on first install
* fix: stupid app ids
* fix: revert back to thumbnail
we are hitting OOM exceptions due to resizing, once we have on-the-fly resizing on server this can be upgraded
* fix: more memory efficient resizing method, remove extraneous resize commands from API call
* fix: random widget use 12 entries instead of 24 to save memory
* fix: modify duration of entries to 20 minutes and only generate 10 at a time to avoid OOM
* feat: toggle to show album name on random widget
* Podfile lock
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* - create constants for thet asset-viewer stack thumbnail sizes
- use 2x selected thumbnail size to set the max-height of the stack-slideshow container.
* - increase the stack-slideshow max-height as it's scrolled
* Revert "- increase the stack-slideshow max-height as it's scrolled"
This reverts commit da4614547a.
* change asset stack veritcal scroll to horizontal scroll
* Fix fade in for video-native-viewer.
The previous implementation never actually faded in the video element.
Fix this by ensuring the video element is only added to the DOM after
mounting, so Svelte can handle the fade-in transition correctly.
* Refactor asset viewing in memory page.
Split photo and video viewing into separate components to ensure they
work similarly to the assets viewer. The previous implementation faded
out the assets, while the assets-viewer only fades assets in. For
images, add a spinner while waiting for the image to load, before adding
the image to the DOM. For videos, add the video to the DOM after
mounting the component. In both cases, the assets fade in smoothly, like
the regular assets viewer.
* fix: styling
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* re-write localization service and add translation extension
* Revert "re-write localization service and add translation extension"
This reverts commit fdd7386020.
* fix can't use context for easy_localization
* fix lint
* update new translate context
* handle context null
* revert main file
* Revert "revert main file"
This reverts commit 16faca46d0.
* remove fix nested MaterialApp
* change use t extenstion and remove translation utils
* update function call similar for consistently
---------
Co-authored-by: dvbthien <dvbthien@gmail.com>
* Match fade transition timing between photo-viewer and memory-viewer.
* Fix blank page after refreshing memory page.
If the user refreshed in the browser while on the memory page, the page
would show a blank page. This was caused by skipping initialization in
afterNavigate. Fix by always initializing the memory page in
afterNavigate.
* WIP: adding screen reader support to mobile
* implemented getAltText
* implemented alt text solution that stores the alt text in the DB, which isn't really great
* moved alt text computation to immich_thumbnail.dart
* added unit tests
* revert unintended changes
* Added text to remaining buttons in Photo page
* fixed import
* Fixed issue of easy_localization not parsing select blocks
* Transferred the new screen reader help to web frontend
* remove unused property
* npm run format:fix
* code review
* revert unwanted change
* dart fmt
* revert web changes
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* Update synology.md
Make sure to change example.env to .env, this is not trivial for non-Docker experts.
* Update synology.md
Wrapped file names in code tags
* chore: linting
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* feat(mobile): Add Scrollbar for vertical scrolling on the actions button of a selected asset.
* fixed error scroll position and add more space for the scrollbar
* revert scrollbar change and display always 5.5 icons button
* minWidth set to 5.5 and used
* fix: logic and fine tuning
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* refactor: timeline manager renames
* refactor(web): improve timeline manager naming consistency
- Rename AddContext → GroupInsertionCache for clearer purpose
- Rename TimelineDay → DayGroup for better clarity
- Rename TimelineMonth → MonthGroup for better clarity
- Replace all "bucket" references with "monthGroup" terminology
- Update all component props, method names, and variable references
- Maintain consistent naming patterns across TypeScript and Svelte files
* refactor(web): rename buckets to months in timeline manager
- Rename TimelineManager.buckets property to months
- Update all store.buckets references to store.months
- Use 'month' shorthand for monthGroup arguments (not method names)
- Update component templates and test files for consistency
- Maintain API-related 'bucket' terminology (bucketHeight, getTimeBucket)
* refactor(web): rename assetStore to timelineManager and update types
- Rename assetStore variables to timelineManager in all .svelte files
- Update parameter names in actions.ts and asset-utils.ts functions
- Rename AssetStoreLayoutOptions to TimelineManagerLayoutOptions
- Rename AssetStoreOptions to TimelineManagerOptions
- Move assets-store.spec.ts to timeline-manager.spec.ts
* refactor(web): rename intersectingAssets to viewerAssets and fix property references
- Rename intersectingAssets to viewerAssets in DayGroup and MonthGroup classes
- Update arrow function parameters to use viewerAsset/viewAsset shorthand
- Rename topIntersectingBucket to topIntersectingMonthGroup
- Fix dateGroups references to dayGroups in asset-utils.ts and album page
- Update template loops and variable names in Svelte components
* refactor(web): rename #initializeTimeBuckets to #initializeMonthGroups and bucketDateFormatted to monthGroupTitle
* refactor(web): rename monthGroupHeight to height
* refactor(web): rename bucketCount to assetsCount, bucketsIterator to monthGroupIterator, and related properties
* refactor(web): rename count to assetCount in TimelineManager
* refactor(web): rename LiteBucket to ScrubberMonth and update scrubber variables
- Rename LiteBucket type to ScrubberMonth
- Rename bucketDateFormattted to title in ScrubberMonth type
- Rename bucketPercentY to monthGroupPercentY in scrubber component
- Rename scrubBucket to scrubberMonth and scrubBucketPercent to scrubberMonthPercent
* fix remaining refs to bucket
* reset submodule to correct commit
* reset submodule to correct commit
* refactor(web): extract TimelineManager internals into separate modules
- Move search-related functions to internal/search-support.svelte.ts
- Extract websocket event handling into WebsocketSupport class
- Move utility functions (updateObject, isMismatched) to internal/utils.svelte.ts
- Update imports in tests to use new module structure
* refactor(web): extract intersection logic from TimelineManager
- Create intersection-support.svelte.ts with updateIntersection and calculateIntersecting functions
- Remove private intersection methods from TimelineManager
- Export findMonthGroupForAsset from search-support for reuse
- Update TimelineManager to use the extracted intersection functions
* refactor(web): rename a few methods in intersecting
* refactor(web): rename a few methods in intersecting
* refactor(web): extract layout logic from TimelineManager
- Create layout-support.svelte.ts with updateGeometry and layoutMonthGroup functions
- Remove private layout methods from TimelineManager
- Update TimelineManager to use the extracted layout functions
- Remove unused UpdateGeometryOptions import
* refactor(web): extract asset operations from TimelineManager
- Create operations-support.svelte.ts with addAssetsToMonthGroups and runAssetOperation functions
- Remove private asset operation methods from TimelineManager
- Update TimelineManager to use extracted operation functions with proper AssetOrder handling
- Rename getMonthGroupIndexByAssetId to getMonthGroupByAssetId for consistency
- Move utility functions from utils.svelte.ts to internal/utils.svelte.ts
- Fix method name references in asset-grid.svelte and tests
* refactor(web): extract loading logic from TimelineManager
- Create load-support.svelte.ts with loadFromTimeBuckets function
- Extract time bucket loading, album asset handling, and error logging
- Simplify TimelineManager's loadMonthGroup method to use extracted function
* refresh timeline after archive keyboard shortcut
* remove debugger
* rename
* Review comments - remove shadowed var
* reduce indents - early return
* review comment
* refactor: simplify asset filtering in addAssets method
Replace for loop with filter operation for better readability
* fix: bad merge
* refactor(web): simplify timeline layout algorithm
- Replace rowSpaceRemaining array with direct cumulative width tracking
- Invert logic from tracking remaining space to tracking used space
- Fix spelling: cummulative to cumulative
- Rename lastRowHeight to currentRowHeight for clarity
- Remove confusing lastRow variable and simplify final height calculation
- Add explanatory comments for clarity
- Rename loop variable assetGroup to dayGroup for consistency
* simplify assetsIterator usage
* merge/lint
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
The first step was missing—it's probably obvious for those already
familiar with Immich.
After I added the external library, no photos showed up anywhere and
all interfaces indicated that I had no photos
Eventually I found this "Scan" button, and after clicking it photos
started to appear. This is a necessary step before photos from the
library actually show up anywhere, so point it out explicitly.
* - updated dtos
- added inAlbums to search builder
- only check isNotInAlbum if albumIds is blank/empty
* - consider inAlbums as OR
* - make open-api-dart
* - lint & format
* - remove inAlbums groupBy clause
* - merge main open-api
* - make open-api
* - inAlbums filter AND instead of OR
* fix handling historical timezones in web client
* honor dst when calculating the timezone offset
* fix variable used to construct timezones list to honor dst
* remove unused variable. fix lint
* initial cast framework complete and mocked cast dialog working
* wip casting
* casting works!
just need to add session key check and remote video controls
* cleanup of classes
* add session expiration checks
* cast dialog now shows connected device at top of list with a list header. Discovered devices are also cached for app session.
* cast video player finalized
* show fullsize assets on casting
* translation already happens on the text element
* remove prints
* fix lintings
* code review changes from @shenlong-tanwen
* fix connect method override
* fix alphabetization
* remove important
* filter chromecast audio devices
* fix some disconnect command ordering issues and unawaited futures
* remove prints
* only disconnect if we are connected
* don't try to reconnect if its the current device
* add cast button to top bar
* format sessions api
* more formatting issues fixed
* add snack bar to tell user that we cannot cast an asset that is not uploaded to server
* make casting icon change to primary color when casting is active
* only show casting snackbar if we are casting
* dont show cast button if asset is remote and we are not casting
* stop playing media if we seek to an asset that is not remote
* remove https check since it works with local http IP addresses
* remove unneeded imports
* fix recasting when socket closes
* fix info plist formatting
* only show cast button if there is an active websocket connection (ie the server is accessible)
* add device capability bitmask checks
* small comment about bitmask
* - Add set primary primary asset button to asset viewer
* - Cleanup
- change AssetAction to contain a StackResponseDto
- Properly update displayed stack at bottom of the asset viewer
* - update the assetStore with the changed stack
* - Cleanup
* fix(mobile): remove dialog wrapper around share asset
* removed from multiple share and delete share dialog class
* Revert change to ShareDialog and useRootNavigator: false for showDialog
* Add a user setting for default album sort order.
Add a user setting under "Features" to control the initial sort order
when creating an album. Default to the existing behavior of
"newest first".
* chore: patch openapi
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix: regression: sort day by fileCreatedAt again
* lint
* e2e test
* inline function
* e2e
* Address comments. Drop dayGroup and timezone in favor of localOffsetMinutes
* lint and some api-doc
* lint, more api-doc
* format
* Move minutes to fractional hours
* make sql
* merge/conflict
* merge fallout, review comments
* spelling
* drop offset from returned date
* move description into decorator where possible, regen api
* refactor: asset-store
* Potential fix for code scanning alert no. 152: Prototype-polluting function
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* feat: display number of likes
* fix: properly decrement like count on unlike
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
* chore: pr feedback
* chore: updated related test
* chore: formatter run
* chore: force numberOfLikes to null in album context to pass lint
* chore: open-api updated
* fix: use undefined, not null
* styling tweaks
* chore: updated sql
---------
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* feat(mobile): add album description functionality
- Introduced a new optional `description` field in the `Album` entity.
- Updated `AlbumViewerPageState` to manage `editDescriptionText`.
- Created `AlbumDescription` and `AlbumViewerEditableDescription` widgets for displaying and editing album descriptions.
- Enhanced `CreateAlbumPage` to include a description input field.
- Implemented backend support for updating album descriptions in `AlbumApiRepository` and `AlbumService`.
- Updated sync logic to handle album descriptions during data synchronization.
- Adjusted UI components to accommodate the new description feature.
* fix dart analysis error
* remove comment that shouldn't be there
* Album header styling
* fix: disable edit after album creation
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): add bulk download functionality and update UI messages
- Added `downloadAll` method to `IDownloadRepository` and its implementation in `DownloadRepository` to handle multiple asset downloads.
- Implemented `downloadAllAsset` in `DownloadStateNotifier` to trigger bulk downloads.
- Updated `DownloadService` to create download tasks for all selected assets.
- Enhanced UI with new download success and failure messages in `en.json`.
- Added download button to `ControlBottomAppBar` and integrated download functionality in `MultiselectGrid`.
* translations use i18n method t()
* Update mobile/lib/services/download.service.dart
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
* fix(mobile): update download logic in DownloadService
- Changed the download method to utilize downloadAll for handling multiple tasks.
- Simplified remoteId check by removing unnecessary condition.
* sort i18n keys
* remove the download signature from interface and logic as we use the downloadAll now
---------
Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
fix(mobile): prevent upload intent replacement in splash screen
- Added a check in the SplashScreenPage to ensure that the route is only replaced when it's not a share intent
- Added lifecycle event to reset the isUpload.value when minimize the app
* improve language ui
* fix lint
* add search language, add safe area, fix button in dark
* hide apply button when search not found
---------
Co-authored-by: dvbthien <dvbthien@gmail.com>
* wip
* added user metadata key
* wip
* restructure onboarding system and add initial locale
* update language card and fix translation updating
* remove prints
* new card formattings
* fix cursed unmount effect
* add OAuth route onboarding
* remove required admin auth for onboarding
* delete the hotwire button
* update open-api files
* delete import
* fix failing oauth onboarding fields
* fix e2e test
* fix web e2e test
* add onboarding to user registration e2e test
* remove todo
this was a holdover during dev and didn't get deleted
* fix server small tests
* use onDestroy to save settings rather than a bind:this
* change to false for isOnboarded
* fix other auth small test
* provide type annotation in user factory metadata field
* remove onboardingCompelted from UserDto
* move translations to onboarding steps array and mark as derived so they update
* break language selector out into its own component as per @danieldietzler suggestion
* remove hello header on card
* fix flixkering on server privacy card
* label/id fixes
* openapi
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* remove import and referenced file
* first pass at replacing all CircleIconButtons
* fix linting issues
* fix combobox formatting issues
* fix button context menu coloring
* remove circle icon button from search history box
* use theme switcher from UI lib
* dark mode force the asset viewer icons
* fix forced dark mode icons
* dark mode memory viewer icons
* fix: back button in memory viewer
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Add a new setting to toggle autoplay when showing the slideshow.
* Fix an issue where the slideshow would restart automatically when
navigating after it was paused.
* Add a keyboard shortcut 's' to start the slideshow from the asset
viewer.
* Add a keyboard shortcut ' ' to toggle the slideshow play/paused.
* Change the timeout for hiding the slideshow controls from 10 to 2.5
seconds.
* Add English translation for the 'autoplay_slideshow' setting.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Fix an issue where clicking the zoom-button after having zoomed in
would not zoom completely out, but leave the image in the zoomed-in
state. The new behavior properly zoomes the image completely out after
clicking the zoom-button.
* Revert to the default setting for `wheelZoomRatio` as the previous
setting of 0.2 was borderline unusable on a trackpad. This could
probably be moved to a user setting if needed.
* Add a keyboard shortcut 'z' to toggle image zoom.
* fix(docs): update the cli upload usage
The cli upload usage is missing some options compared to what is the current
output of `immich upload --help`. Update the docs accordingly.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
* feat(cli): add --json-output option to upload command
Add an option that allows retrieving per-file information about the
upload process. The output includes the newFiles, duplicates and
newAssets lists, but could accommodate more information later if needed.
One use case this allows for is using --dry-run to get a list of all the
files that would be uploaded, and checking them manually before an
upload. This can be particularly useful when a curated subset of images
have already been uploaded to immich and we want to double check for
some stragglers without uploading everything to immich.
The upload command has a few lines of logging, so to get an actually
parsable json one needs to strip those lines:
immich upload --dry-run * | tail -n +4 | jq .newFiles[]
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
---------
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
* Add automatic OpenID Connect login by using parameter `autoLaunch=1`
By launching Immich with `/auth/login?autoLaunch=1` an OpenID Connect login attempt is directly initated on installations where OAuth Auto Launch is not enabled. The intended use for this parameter is to enable Immich to be launched from e.g. Nextcloud using the _External sites_ app and the _oids_ OpenID Connect provider app so as to enable the user to directly interact with Immich without the need to press the `Login with ...` button.
* Add documentation for autolaunch by navigating to `/auth/login?autoLaunch=1`
* Look ma, no braces!
_This could be a single line_
And now it is, as is its predecessor.
* Change formatting to satisfy _prettier_
* if (condition) return true -> return condition
* More _prettier_ reformatting
* Look ma, braces!
* Update locked folder text and remove unused translations
* uppercase Locked folder in Menu
* convert some translates to icu and improve
* add iOS debug info translations for background processes
* fix lint
---------
Co-authored-by: dvbthien <dvbthien@gmail.com>
* feat: delta sync
* fix: ignore iCloud assets
* feat: dev logs
* add full sync button
* remove photo_manager dep for sync
* misc logs and fix
* add time taken to DLog
* fix: build release iOS
* ios sync go brrr
* rename local sync service
* update isar fork
* rename to platform assets / albums
* fix ci check
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Change photo zoom logic
To properly zoom to current position and pan at the correct speed
TODO: zoom to current pinch position
* zoom to current pinch position
* Clean unused variable
* Formatting
* fix: lint
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* add setting switch
this isnt bound to anything yet
* make google casting opt-in
* doc updates
* lint docs
* remove unneeded translation items
* update mobile openai defs
* fix failing test
we need to mock user prefs since CastButton uses it
* feat: api access control
* feat(web): granular api access controls
* fix test
* fix e2e test
* fix: lint
* pr feedback
* merge main + new design
* finalize styling
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* move support & feedback button to user modal
* cleanup styling of link
* update sign out button to use immich/ui
* revise sign out button to match design from @alextran1502
* more margin on support/feedback
* feat(web): add to locked folder in album and search
* feat(web): add to locked folder in favorite and archive
* fix: lint
* feat: add to person page
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* recreate #13966
* gcast button works
* rewrote gcast-player to be GCastDestination and CastManager manages the interface between UI and casting destinations
* remove unneeded imports
* add "Connected to" translation
* Remove css for cast launcher
* fix tests
* fix doc tests
* fix the receiver application ID
* remove casting app ID
* remove cast button from nav bar
It is now present at the following locations:
- shared link album and single asset views
- asset viewer (normal user)
- album view (normal user)
* part 1 of fixes from @danieldietzler code review
* part 2 of code review changes from @danieldietzler and @jsram91
* cleanup documentation
* onVideoStarted missing callback
* add token expiry validation
* cleanup logic and logging
* small cleanup
* rename to ICastDestination
* cast button changes
* Add class to apply SSL options
* Apply client certificate for native Android code
* Refactor self-signed check
* Allow self-signed certificates
* Fix Dart analysis
* Add HostnameVerifier
Android explicitly does NOT check the Common Name of a certificate,
only the Subject Alt Names. Chances are that someone who self-signs a
certificate doesn't go through the extra steps to add a SAN, and in
that case the connection would be prevented by the HostnameVerifier
even thought the TrustManager was fine with the certificate itself.
* Rename parameter like in Dart
* Fix NPE
* Catch all native errors in HttpSSLOptionsPlugin
* Workaround for too early onChanged() callback
* Fix formatting
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* more robust person thumbnail generation
* clamp bounding boxes
* update sql
* no need to process invalid images after decoding
* cursed knowledge
* new line
* feat: private view
* pr feedback
* sql generation
* feat: visibility column
* fix: set visibility value as the same as the still part after unlinked live photos
* fix: test
* pr feedback
* Transform imported face RegionInfo according to Exif Orientation
* Add unit tests for re-orienting metadata face regions
* Make code DRY using ImmichTagsWithFaces instead of NonNullable
* Add e2e test for importing metadata face regions when orientation is RotateCW90
* Disable new e2e test until its asset is added to the test-assets project
* Simplify unit tests by using the same face tag definition
* Combine similar e2e tests
* Disable new e2e test until portrait-orientation-6.jpg is added to test-assets
* Fix lint error: Expected property shorthand
* Update test-assets ref to latest
* Enable new e2e test after updating test-assets
* add btn, map and marker
* Fix bug in navigation assetviewer
* Correct bug on main Viewer
* Add to user album the map of his pictures
* change icon to outline
* lint & format
* with manager instead of variable
* remove duplicate
* chore: minor styling change
* formatting
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
We would like to move away from the concept of finding and removing pending
jobs. The only place this is used is for album update notifications, and this
is done so that users who initially uploaded assets to an album will also
receive a notification if someone else then adds assets to the same album. This
can also be achieved with a job for each recipient. Multiple jobs also has the
advantage that it will scale better for albums with many users, it's possible
to send notifications concurrently, retries are possible without sending
duplicate notifications, and it's clear what recipient a job failed for.
* chore(server): don't insert embeddings if the model has changed
We're moving away from the heuristic of waiting for queues to complete. The job
which inserts embeddings can simply check if the model has changed before
inserting, rather than attempting to lock the queue.
* more robust dim size update
* use check constraint
* index command cleanup
* add create statement
* update medium test, create appropriate extension
* new line
* set dimension size when running on all assets
* why does it want braces smh
* take 2
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
* feat: responsive date group header height
* update tests
* feat(web): improve perf when changing mobile orientation (#17945)
fix: improve perf when changing mobile orientation
* feat: Create .well-known/security.txt
* feat: Add another security.txt for the main website
* fix: deploy hidden files
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* feat: Service Worker to preload/cancel images and other resources
* Remove caddy configuration, localhost is secure if port-forwarded
* fix e2e tests
* Cache/return the app.html for all web entry points
* Only handle preload/cancel
* fix e2e
* fix e2e
* e2e-2
* that'll do it
* format
* fix test
* lint
* refactor common code to conditionals
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fixed missing $locale parameter to .toLocaleString
* Remove unused types and functions in timeline-util
* remove unused export
* re-enable export because it is needed for tests
* format
* bump sharp
* test linking
* link in prod image too
* force global
* keep unnecessary libraries
* override sharp version
* revert dockerfile changes
* add node-gyp and napi
* dev dependency
* Remove small thumbnail and cache generated thumbnails
* Creating the small thumbnails takes quite some time, which should not be underestimated.
* The time needed to generate the small or big thumbnail is not too different from each other. Therefore there is no real benefit of the small thumbnail and it only adds frustration to the end user experience. That is because the image appeared to have loaded (the visual move from blur to something better) but it's still so bad that it is basically a blur. The better solution is therefore to stay at the blur until the actual thumbnail has loaded.
* Additionaly to the faster generation of the thumbnail, it now also gets cached similarly to the remote thumbnail which already gets cached. This further speeds up the all over usage of the app and prevents a repeatet thumbnail generation when opening the app.
* Decreased the quality from the default 95 to 80 to provide similar quality with much reduces thumbnail size.
* Use try catch around the read of the cache file.
* Use the key provided in the loadImage method instead of the asset of the constructor.
* Use userId instead of ownerId
* Remove import
* Add checksum to thumbnail cache key
Job workers are currently started on app init, which means they are started
before the DB is initialised. This can be problematic if jobs which need to use
the DB start running before it's ready. It also means that swapping out the
queue implementation for something which uses the DB won't work.
* fix: ensure oauth state param matches before finishing oauth flow
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* chore: upgrade openid-client to v6
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* feat: use PKCE for oauth2 on supported clients
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* feat: use state and PKCE in mobile app
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: remove obsolete oauth repository init
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: rewrite callback url if mobile redirect url is enabled
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: propagate oidc client error cause when oauth callback fails
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: adapt auth service tests to required state and PKCE params
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: update sdk types
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: adapt oauth e2e test to work with PKCE
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
* fix: allow insecure (http) oauth clients
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
---------
Signed-off-by: Tin Pecirep <tin.pecirep@gmail.com>
Co-authored-by: Jason Rasmussen <jason@rasm.me>
Remove loading of thumbnail in the image provider
* Removed the load of the thumbnail from the local and remote image provider as they shall provide the image, not the thumbnail. The thumbnail gets provided by the thumbnail provider.
* The thumbnail provider is used as the loadingBuilder and the image provider as the imageProvider. Therefore loading the thumbnail in the image provider loads it a second time which is completely redundant, uses precious time and yields no results.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Revert "fix(mobile): use immutable cache keys for local images (#17736)"
This reverts commit 010b144754.
* Revert "perf(mobile): remove small thumbnail and cache generated thumbnails (#17682)"
This reverts commit b71039e83c.
* Remove small thumbnail and cache generated thumbnails
* Creating the small thumbnails takes quite some time, which should not be underestimated.
* The time needed to generate the small or big thumbnail is not too different from each other. Therefore there is no real benefit of the small thumbnail and it only adds frustration to the end user experience. That is because the image appeared to have loaded (the visual move from blur to something better) but it's still so bad that it is basically a blur. The better solution is therefore to stay at the blur until the actual thumbnail has loaded.
* Additionaly to the faster generation of the thumbnail, it now also gets cached similarly to the remote thumbnail which already gets cached. This further speeds up the all over usage of the app and prevents a repeatet thumbnail generation when opening the app.
* Decrease quality and use try catch
* Decreased the quality from the default 95 to 80 to provide similar quality with much reduces thumbnail size.
* Use try catch around the read of the cache file.
* Replace ImmutableBuffer.fromUint8List with ImmutableBuffer.fromFilePath
* Removed unnecessary comment
* Replace debugPrint with log.severe for catch of error
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* refactor: user entity
* chore: rebase fixes
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* feat: drift
* pr feedback
* refactor: move common overrides to mixin
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* feat: user & partner sync stream
* pr changes
* refactor: sync service and add tests
* chore: remove generated change
* chore: move sync model
* rebase: convert string ids to byte uuids
* rebase
* add processing logs
* batch db calls
* rewrite isolate manager
* rewrite with worker_manager
* misc fixes
* add sync order test
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
Clear the backup detail view when no backup is in progress
* When no backup is in progress, display a simple "-" for the details in the upload file info, instead of the data of the last uploaded asset.
* This prevents confusion if a upload job is stuck or just finished.
* perf(mobile): optimize date loading with batch loading
Introduce DateBatchLoader to reduce the number of database queries by loading dates in batches, improving performance when querying large lists.
* remove unused totalCount parameter from DateBatchLoader
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Dont show drag scroll date in search page
* When using the drag scroll, the date of the current image is shown. This is now made toggleable.
* For the mobile search result page, the display of the date is now disabled because the results are not sorted by date and therefore a display of the date is not desirable.
It seems insta360 stores metadata in XMP GPano tags, with their own
non-standard and undocumented addition `SourceImageCreateTime`. For some
pictures this is the only EXIF tag containing a creation time.
* fix(web): search bar deactivates when focus exits
* fix: disable search bar on destroy
For example, on the search page. If the escape key is pressed while the advanced filters button is focused, the search page will close but the search bar will remain activated.
* remove face, person and face search entities
update tests and mappers
check if face relation exists
update sql
unused imports
* pr feedback
generate sql, remove unused imports
* feat: sync pictureFile with oidc if it isn't set already
fix: move picture writer to get userId
fix: move await promise to the top of the setPicure function before checking its value and automatically create the user folder
chore: code cleanup
* fix: extension double dot
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* always patch package when running npm i, install immich CLI outside of directory so post install doesnt run
* handles case where query is an object and defined but origin is not.
* move patch-package from a dev dependency to a normal dependency. Also copy the patches folder for the docker build to use and patch with
* fix Dockerfile
* use query.reject instead of throw for queryError
* package-lock to reflect the dev dependency change
* dont throw the error, just provide an empty string for query.origin if it does not exist
* remove npm link and demote patch-package back to a dev dependency
* modify patch to add defensive check to catch queries that will fail to parse and reject
* fix(mobile): hide asset description text field if user is not owner
* If user is not the owner and asset has no description then hide the text field
* Apply suggestions from code review
Co-authored-by: Alex <alex.tran1502@gmail.com>
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* Features: Local file movement to trash and restoration back to the album added. (Android)
* Comments fixes
* settings button marked as [EXPERIMENTAL]
* _moveToTrashMatchedAssets refactored, moveToTrash renamed.
* fix: bad merge
* Permission check and request for local storage added.
* Permission request added on settings switcher
* Settings button logic changed
* Method channel file_trash moved to BackgroundServicePlugin
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* chore: add geodata indexes to table definitions
* chore: rename incorrectly name geodata index
* fix: import into geodata places with correct index names
* refactor: device asset entity to use modified time
* chore: cleanup
* refactor: remove album media dependency from hashservice
* refactor: return updated copy of asset
* add hash service tests
* chore: rename hash batch constants
* chore: log the number of assets processed during migration
* chore: more logs
* refactor: use lookup and more tests
* use sort approach
* refactor hash service to use for loop instead
* refactor: rename to getByIds
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* use original image if web compatible
* add e2e
* fix shared link handling
* handle redirect in e2e
* fix size not being passed to thumbnail url
* test fullsize in e2e
* feat(server): Avoid face matching with people born after file creation date (#4743)
* lint
* add medium tests for facial recognition
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(web): don't show a scrollbar when hovering over the last row of images on the search page
* Format code
* Fix asset selection z-index
* Remove anchor overlay on mouseover
* Fix a test
* Fix merge
* Fix overlays
* fix merge
* fix stack thumbs in asset viewer
* fix dimmed bounds, animation
* lint
---------
Co-authored-by: Min Idzelis <min123@gmail.com>
* refactor: user entity
* chore: rebase fixes
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* feat: drift
* pr feedback
* refactor: move common overrides to mixin
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* feat: expand/collapse sidebar
* fix: general PR cleanup
- add skip link unit test
- remove unused tailwind styles
- adjust asset grid spacing
- fix event propogation
* fix: cleaning up event listeners
* fix: purchase modal and button on small screens
* fix: explicit tailwind classes
* fix: no animation on initial page load
* fix: sidebar spacing and reactivity
* chore: reverting changes to icons in nav and account info panel
* fix: remove left margin from the asset grid after merging in new timeline
* chore: extract search-bar changes for a separate PR
* fix: add margin to memories
* feat(server): extract full-size previews from RAW images
* feat(web): load fullsize preview for RAW images when zoomed in
* refactor: tweaks for code review
* refactor: rename "converted" preview/assets to "fullsize"
* feat(web/server): fullsize preview for non-web-friendly images
* feat: tweaks for code review
* feat(server): require ASSET_DOWNLOAD premission for fullsize previews
* test: fix types and interfaces
* chore: gen open-api
* feat(server): keep only essential exif in fullsize preview
* chore: regen openapi
* test: revert unnecessary timeout
* feat: move full-size preview config to standalone entry
* feat(i18n): update en texts
* fix: don't return fullsizePath when disabled
* test: full-size previews
* test(web): full-size previews
* chore: make open-api
* feat(server): redirect to preview/original URL when fullsize thumbnail not available
* fix(server): delete fullsize preview image on thumbnail regen after fullsize preview turned off
* refactor(server): AssetRepository.deleteFiles with Kysely
* fix(server): type of MediaRepository.writeExif
* minor simplification
* minor styling changes and condensed wording
* simplify
* chore: reuild open-api
* test(server): fix media.service tests
* test(web): fix photo-viewer test
* fix(server): use fullsize image when requested
* fix file path extension
* formatting
* use fullsize when zooming back out or when "display original photos" is enabled
* simplify condition
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
* add patch-package to dev dependencies
this allows us to patch upstream packages without waiting for PRs to be merged (or not!). Patch-package does a pretty good job of notifying if upstream does a change to invalidate the patch (its a git patch under the hood).
* Patch implementation of https://github.com/porsager/postgres/pull/944
This PR has not been merged by upstream and helps produce verbose error messages when postgres fails to connect (usually incorrect credentials). This is in contrast to error messages such as
`TypeError: Cannot read properties of undefined (reading 'replace'), stack: TypeError: Cannot read properties of undefined (reading 'replace')`
* have postinstall only run when not installing a global package (such as immich-cli in the Docker build)
we can't run specifically the handleUserDeleteCheck tests concurrently due to one of the tests modifying the config in the shared database
if run concurrently you can get race conditions where the other tests pick up the change, even with resetting the config in the beforeEach
therefore the test that checks a delete actually happens, fails
there are many ways to solve this, disabling concurrency for the suite, forcing sequential tests for just handleUserDeleteCheck, increasing the delete test deletedAt to more than the custom duration tests deleteDelay
I applied all three of these. You could also force all the user tests to run in their own databases, but that feels overkill
* fix(server) optimize number of sql calls for GET /api/albums
remove unnecessary join for getMetadataForIds
remove separate call to getLastUpdatedAssetForAlbumId
* fix(server) remove unnecessary getLastUpdatedAssetForAlbumId call for GET /api/album/:id
also remove getLastUpdatedAssetForAlbumId query as it is no longer referenced
* fix(server): correct lastModifiedAssetTimestamp return type + formatting and typing
* chore(server): address type issue with tests found via npm:check
tests & lint still pass before this commit.
* feat: use my.immich.app for externalDomain fallback
This is probably more useful than localhost.
* chore: remove port param
* fix: update expected value in tests
* fix: update expected value in e2e
* chore: upgrade svelte-maplibre and enforce runes
* feat: maplibre-gl 5, globe view, style hot reloading, fast map markers
* fix: remove location-pin class that wasn't being used
---------
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
* feat(web): max grid row height responsive
* also gallery-viewer
* lint
* feat(web): support long-press selection on mobile web
* use svelte-gestures
* fix test
* Bug fix
* globalThis
* format
* revert generator
* Testing
* bad merge
* Fix typo/tap on thumbnail
* feat: shrink header on small screens (#16909)
* feat(web): shrink header on small screens
* fix test
* test
* Fix test
* Revert user-page-layout chagne
* Restore icons sizes, make consistent, improve logo responsiveness
* remove 4 more pix, lint
* lint
* chore
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* Revert "Testing"
This reverts commit 442f11c9e1.
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* chore(mobile): search field in separate widget
* fix: removed unnecessary use of context
* chore: minor styling tweak
* fix: controller not bound
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
mobile: fallback authentication client model/type to unknown
Add fallback for client model/type if device is not ios or android
Signed-off-by: Luis Garcia <git@luigi311.com>
* add npm prettier dep and format script to .github folder
* initial work on prettier formatting test
* attempt index notation
* change name of .github job to be valid
* another use of index notation
this is getting overcomplicated
* Change job ID to `github-files-formatting` and chane the name to `.github Files Checks`
* Change job name to `.github Files Formatting`
* Update Makefile with .github module and `filter-out`s
* run prettier formatting as added in this PR
* fix(web): update stack state in timeline
* js docs
* fix: handle state update from unstack action from gallery viewer
* use navigate in View Stack notification
---------
Co-authored-by: Snowknight26 <Snowknight26@users.noreply.github.com>
* fix(web): fix asset grid showing nothing with an invalid asset target
* Deduplicate
* Scroll to position where appropriate
* a bit cleaner
* fix: lint
---------
Co-authored-by: Min Idzelis <min123@gmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(web): timeline renders nothing after archiving in asset viewer
* fix(web): timeline renders nothing after archiving in asset viewer
* fix: ensure geometry updated when performing bulk action on all
* fix: album assets selection
📝 Clarify missing ':ro' tag in volume mount as a warning
Changed description in comment of example docker compose file to clarify it as a warning that Immich may delete it, instead of sounding as if it is ok to delete.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* 16712: Proper intialisation of the memory store to avoid loading up duplicate object refs of the same asset.
* 16712: Add auth to memory mapping so isFavorite is actually return correctly from the server.
* 16712: Move logic that belongs in the store into the store.
* 16712: Cleanup.
* 16712: Fix init behaviour.
* 16712: Add comment.
* 16712: Make method private.
* 16712: Fix import.
* 16712: Fix format.
* 16712: Cleaner if/else and fix typo.
* fix: icon size mismatch
* 16712: Fixed up state machine managing memory playback:
* Updated to `Tween` (`tweened` was deprecated)
* Removed `resetPromise`. Setting progressController to 0 had the same effect, so not really sure why it was there?
* Removed the many duplicate places the `handleAction` method was called. Now we just called it on `afterNavigate` as well as when `galleryInView` or `$isViewing` state changes.
* 16712: Add aria tag.
* 16712: Fix memory player duplicate invocation bugs. Now we should only call 'reset' and 'play' once, after navigate/page load. This should hopefully fix all the various bugs around playback.
* 16712: Cleanup
* 16712: Cleanup
* 16712: Cleanup
* 16712: Cleanup
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* refactor: user entity
* chore: rebase fixes
* refactor: remove int user Id
* refactor: migrate store userId from int to string
* refactor: rename uid to id
* fix: migration
* pr feedback
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* feat(ml): introduce support of onnxruntime-rocm for AMD GPU
* try mutex for algo cache
use OrtMutex
* bump versions, run on mich
use 3.12
use 1.19.2
* acquire lock before any changes can be made
guard algo benchmark results
mark mutex as mutable
re-add /bin/sh (?)
use 3.10
use 6.1.2
* use composite cache key
1.19.2
fix variable name
fix variable reference
aaaaaaaaaaaaaaaaaaaa
* bump deps
* disable algo caching
* fix gha
* try ubuntu runner
* actually fix the gha
* update patch
* skip mimalloc preload for rocm
* increase build threads
* increase timeout for rocm
* Revert "increase timeout for rocm"
This reverts commit 2c4452f5d132198ed381a7b262b4a5cab5114b5f.
* attempt migraphx
* set migraphx_home
* Revert "set migraphx_home"
This reverts commit c121d3e48754b3bce100636f8d666deec58a44b7.
* Revert "attempt migraphx"
This reverts commit 521f9fb72dbe506dc6cb8faeb6494817d87265c6.
* migraphx, take two
* bump rocm
* allow cpu
* try only targeting migraphx
* skip tests
* migraph ❌
* known issues
* target gfx900 and gfx1102
* mention `HSA_USE_SVM`
* update lock
* set device id for rocm
---------
Co-authored-by: Mehdi GHESH <mehdi.ghesh@hotmail.fr>
* refactor: user entity
* chore: rebase fixes
* refactor(mobile): move user service to domain
* fix: timeline not visible on album selection page
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* fix(mobile): the page for adding photos to the album cannot be navigated back using gestures #16409
* First-time return gesture adds the feature to cancel all current selections
---------
Co-authored-by: ExceptionsOccur <yuyu.tao@foxmail.com>
* refactor: user entity
* fix: add users to album & user profile url
* chore: rebase fixes
* generate files
* fix(mobile): timeline not reset on login
* fix: test stub
* refactor: rename user model (#16813)
* refactor: rename user model
* simplify import
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* chore: generate files
* fix: use getAllAccessible instead of getAll
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(web): update search results when searching from info panel
* Prevent double search when using search bar
* Format/lint
* Fix infinite loading on intersect
* Remove redundant function
* 15712: Added keyboard shortcuts for opening add to album modal and highlighting/selecting an album to add to.
* 15712: Re-factored logic from template code into script. Extracted new album button into separate cmponent.
* 15712: Document new keyboard shortucts now that they work everywhere.
* 15712: Extract some constants/helper functions.
* 15712: Missing comma.
* 15712: Pulled logic out into separate unit testable class.
* 15712: Added a unit test.
* 15712: Move the modal back up to keep the github PR happy.
* 15712: PR feedback - renamed typescript files and switch to class bind directive.
* 15712:Move selection modal into correct package.
* 15712: Better naming of module and files.
* 15712: Add asset highlight using arrow keys.
* 15172: Add escape behaviour everywhere.
* 15712: Don't allow highlighting past start or end.
* 15712: Clear the highlight on changes to the component state.
* 15712: Use focus to track highlighted element.
* 15712: Rename highlight -> focussed.
* 15712: Better naming.
* 15712: Cleanup.
* 15712: Cleanup & simplify.
* 15712: bugfix for clicking on button.
* 15712: Cleanup.
* 15712: Rollback unnecessary changes.
* 15712: Add unit test.
* 15712: Add thumbnail unit test.
* 15712: Prettier.
* 15712: Fix merge issue.
* 15712: Add shortcut info.
* 15712: Fix linter.
* feat(web): exposed a new job to create a manual database backup
* chore(server): added a new test case
* chore(server): moved job to backup db into the create job popup
* remove irrelevant change
* openapi
* chore: formatting
* docs: trigger backup documentation
---------
Co-authored-by: Lorenzo Montanari <13736036+l0ll098@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
Co-authored-by: Zack Pollard <zack@futo.org>
* feat(web): show birthdate on person page
* shorten null check
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* directly use birthDate
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
Co-authored-by: Alex <alex.tran1502@gmail.com>
Update unraid.md
Current steps omit this key step, which results in the postgresql docker complaining about the data folder not being empty. (It tries to use the `/mnt/user/appdata` folder as its application data folder.
* Retain search context in LocalStorage.
* Remove debug logging
* Prettier
* Added QueryType and VALID_QUERY_TYPES to $lib/constants
* Prettier
* Renamed VALID_QUERY_TYPES to fit the codestyle.
Ran prettier
* show current search type on search bar
* fix: linting
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
The API currently does not respect the documentation when returning a
person's birthDate. The doc/swagger says it will be of "YYYY-MM-DD"
format but the string is a full ISO8601-with-tz string. This causes
issue #16216 because the <input> tag is strict about supported value
formats.
I believe this was introduced by #15242 which switched some queries from
TypeORM to Kysely for the person repository. TypeORM does not parse
date, but our Kysely configuration does (explicitely).
This commits updates the types to represent both possibilities and ensure
the API always returns the correct format.
* feat: log before running migrations
* fix: it's called log not info
It should be called info...
* chore: fix formatting
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* use exiftool for file date metadata
* handle tag not existing in exifinfo (?)
* update medium tests
* fix typo
* set file size too
* set file size only if undefined
* refactor cache control handling in server/utils/file.ts
* add ability to null CacheControl.NONE
* Cache control handling comment
* Added comment to file.ts
This comment provides a better understanding of what the cacheControlHeader is doing.
* Update file.ts
Added comments
* Update server/src/utils/file.ts
* fix comments in file.ts
* run prettier with --write to fix formatting
---------
Co-authored-by: pnleguizamo <pnleguizamo@gmail.com>
Co-authored-by: drew-kearns <dkearns@iastate.edu>
Co-authored-by: Sierra (Izumi) Brown <119357873+SierraIBrown@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This patch enables PMTiles protocol for MapLibre-GL. Protocol allows to fetch tiles from a single file. This drastically simplifies the process to self-host own tiles.
* Work in progress - super quick asset store->state
* bugfix: deep linking to timeline, on scrub stop
* format, remove stale
* disable test, todo: fix test
* remove unused import
* Fix merge
* lint
* lint
* lint
* Default to non-wasm layout
* lint
* intobs fix
* fix rejected promise
* Review comments, static import wasm
* Back to dynamic
* try top-level-await
* back to the first solution, with more finesse
* comment out wasm for now
* back out the wasm/thumbhash/thumbnail changes
* lint
* Fully remove wasm
* lockfile
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* fix(server): check updateLibraryIndex for zero
* Update web/src/routes/admin/library-management/+page.svelte
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
docs: clean up environment variables formatting & grammar - Just going through the docs and noticed some inconsistent capitalization and minor grammar issues. Fixed them up while having my Monday coffee :) Nothing major, but makes the docs a bit more polished.
* feat(cli): watch paths for auto uploading daemon
* chore: update package-lock
* test(cli): Batcher util calss
* feat(cli): expose batcher params from startWatch()
* test(cli): startWatch() for `--watch`
* refactor(cli): more reliable watcher
* feat(cli): disable progress bar on --no-progress or --watch
* fix(cli): extensions match when upload with watch
* feat(cli): basic logs without progress on upload
* feat(cli): hide progress in uploadFiles()
* refactor(cli): use promise-based setTimeout() instead of hand crafted sleep()
* refactor(cli): unexport UPLOAD_WATCH consts
* refactor(cli): rename fsWatchListener() to onFile()
* test(cli): prefix dot to mocked getSupportedMediaTypes()
* test(cli): add tests for ignored patterns/ unsupported exts
* refactor(cli): minor changes for code reviews
* feat(cli): disable onFile logs when progress bar is enabled
* 15712: Added keyboard shortcuts for opening add to album modal and highlighting/selecting an album to add to.
* 15712: Re-factored logic from template code into script. Extracted new album button into separate cmponent.
* 15712: Document new keyboard shortucts now that they work everywhere.
* 15712: Extract some constants/helper functions.
* 15712: Missing comma.
* 15712: Pulled logic out into separate unit testable class.
* 15712: Added a unit test.
* 15712: Move the modal back up to keep the github PR happy.
* 15712: PR feedback - renamed typescript files and switch to class bind directive.
* 15712:Move selection modal into correct package.
* 15712: Better naming of module and files.
* fix(server): stringify error log parameter to ensure correct overload
The intended error(message, stack, context) overload is only selected if context is a string.
* formatter
* Prospective fix for ensuring that known active ML servers are used to reduce search delay.
* Added some logging and renamed backoff const.
* Fix lint issues.
* Update to use env vars for timeouts and updated documentation and strings.
* Fix docs.
* Make counter logic clearer.
* Minor readability improvements.
* Extract skipUrl logic per feedback, and change log to verbose.
* Make code harder to read.
* fix(web): update search modal to not jump around
Search People selection will change size while loading. This causes the
search modal to jump around as the people load in.
* loading spinner size
* remove unsued code
---------
Co-authored-by: cwlowder <me@curtislowder.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
Uses a global store to remember the last location chosen by a user when
editing asset locations. This fixes an annoyance when adding location
data to multiple assets in a row and having to zoom in the same area
everytime.
immich-app/immich#16062 added manual face tagging and deletion, but did
not add a new 'SourceType'. The create faces would default to
'machine-learning' which is incorrect, and has the annoying downside
that they will be wiped when the 'Refresh Faces' job is run.
Handling of non-machine-learning faces was previously added in
immich-app/immich#6455. This PR simply extends it to the new manually
tagged faces.
* Implemented possible fix for the new_release window re-appearing across all active sessions when a new websocket connection is established.
* Reverted websocket.ts
Changes not needed to websocket.ts - was bouncing between ideas, current implementation doesn't need this to change.
* Prettier test format.
* Spelling (Aknowledged --> Acknowledged)
* Update community-guides.tsx
Added an additional card linking to a remote access guide
* Update docs/src/components/community-guides.tsx
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* concat location properties and use URL constructor to fix issues
* remove slashes from old version urls
* remove versions 1.125.0 and 1.125.4 that don't have docs archives
* feat(mobile): photos group by date in album page view
* fix: format
---------
Co-authored-by: ExceptionsOccur <yuyu.tao@foxmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* ci: print out typeorm generation changes
* feat: sync implementation for the user entity
wip
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* Add rating to search DTO
* Add search by EXIF rating in search query builder
* Generate OpenAPI spec
* Add rating filter on web
* Add rating filter to search docs
* Format / lint
* Hide rating filter if ratings are disabled
* chore: component order in form
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
Similarly to how one can search by partial filename, change the
path search to work with partial matches instead of looking for a
full match.
Co-authored-by: Alex <alex.tran1502@gmail.com>
Fixing the server endpoint on the login screen. It added the "/api" suffix instead of using the default method getServerUrl, which takes care of sanitizing the URL.
Co-authored-by: Joao Paulo Ros <ros@voxit.ai>
Limit width of logo in emails to 100%
The current live version breaks Yahoo Mail (at least in Firefox). It appears far too large and makes the email unreadable by pushing the text outside of the reading pane.
* fix: include live images in person view count
Fixed an issue where the total image count in the person view excluded live images.
The query now correctly accounts for all relevant assets by removing the condition
that filtered out assets with a livePhotoVideoId.
Issue:
- Image count under a person’s name was inaccurate, showing only static images.
Fix:
- Removed `.on('assets.livePhotoVideoId', 'is', null)` from the LEFT JOIN condition.
Tested on:
- Web
Ran PR checklist
* chore: run make sql.
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(profile-image-cropper): ensure correct image area is saved after transparency check
Fixed an issue where users could not set a profile picture due to incorrect transparency detection.
After addressing transparency detection by passing explicit dimensions, another issue arose where the
generated blob did not represent the correct cropped image area. To fix this, a new cropped blob was generated using the canvas that was used to check for transparent pixels.
- Pass image width and height explicitly to `hasTransparentPixels` for accurate processing.
- Return both transparency status and the correctly cropped image blob.
- Ensure the final uploaded image is taken from `croppedImageBlob` to reflect user adjustments.
* chore: run pr web checklist. No issues in the changed file.
* fix(profile-image-cropper): ensure correct image area is saved after transparency check
Fixed an issue where users could not set a profile picture due to incorrect transparency detection.
To fix this, a new cropped blob was generated using the height and width of the imgElement.
Note: this is a simpler fix than the one in the previous commit.
* lint
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* chore: update of the persian translation
* chore: update of the persian translation
* chore: update of the persian translation
* chore: update of the persian translation
* feat: added ability to mark people as favorite, which get sorted to the front of the people list
* feat(server): added unit test for favorite people
* feat(server): refactored for better readability
* fixed person service unit tests
* fixed open-api and sql checks
* fixed bad codegen and removed unnecessary type assertion again
* chore: clean up
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
* Update current asset to play video.
* Updated location of currentAssetProvider update per feedback.
* Added a playbackDelayFactor to the video viewer to resolve an issue in memories.
Also adjusted the scale of the memory preview image to match the ratio of the video. This still appears to jump because the video preview doesn't seem to be the first frame for some reason :\
* add video indicator
---------
Co-authored-by: Tom graham <tomg@questps.com.au>
Co-authored-by: Alex <alex.tran1502@gmail.com>
fix: bash script for mac os
Fix the displayed IP address in bash script if hostname fails to return a string
Co-authored-by: Joseph McKenna <dev@jtkmckenna.com>
* fix(mobile): improved the visibility of backup cloud icon on lighter images
* refactor(mobile): add 'const' keyword to Offset constructor for improved performance
* feat(web): merge suggestion modal: focus on Yes button by default.
* refactor(web): merge suggestion modal: use Button from @immich/ui.
---------
Co-authored-by: André Ventura <afv@users.noreply.github.com>
* fix(album-viewer): retain edited title when album updates
ensure `AlbumViewerEditableTitle` keeps user input while editing,
even when the album updates from another provider. fall back to
`albumName` only when not in edit mode.
* linting
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
fix(web): cancel people merge selection: do not show "Change name successfully" notification.
Co-authored-by: André Ventura <afv@users.noreply.github.com>
* original/preview switching in photo-sphere-viewer
1. default to preview in photo-sphere-viewer video mode
2. install and integrate @photo-sphere-viewer/settings-plugin & @photo-sphere-viewer/resolution-plugin
* fix lint errors
* fix(server): cannot render album page when all assets of an album are in trash
* inner join
* add e2e test
* check empty albums too
* render add to album button on empty album
* lint
* count 0 if undefined
* fix album card test
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
When marking an offline asset as online again, do not reset the
fileCreatedAt value. This value contains the "true" date, copied
from exif.dateTimeOriginal. If we overwrite this value, we'd need
to run the metadata extraction job again. Instead, we just leave
the old (and correct) value in place.
fixes#15640
- Fix missing timezones
- Remove the UTC prefix from timezone display text to align with web app
- Remove unnecessary layout builder
- Created a custom `DropdownSearchMenu` widget
Co-authored-by: Alex <alex.tran1502@gmail.com>
Fix upload timeout issue
Fix an issue where when uploading a large file, the upload would consistently abort after 30 minutes. I changed this timeout from 30 minutes to 1 day. Maybe that's excessive, or maybe the timeout isn't even needed, but the current 30 minute timeout definitely seems way too short.
* refactor: migrate shared-link repository to kysely
* fix duplicate individual shared link return in getAll when there are more than 1 asset in the shared link
* using correct order condition
* using eb.table
---------
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Update config.py
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Apply formatting
* minor update
* formatting
* root validator
* minor update
* minor update
* minor update
* change to support explicit models
* minor update
* minor change
* minor change
* minor change
* minor update
* add logs, resolve errors
* minor change
* add new enviornment variables
* minor revisons
* remove comments
* add additional variables to ML (fixed)
* add additional variables to ML (fixed)
* add additional variables to ML
* formatting
* remove comment
* remove mypy error
* remove unused module
* merge f strings
* chore: migrate map repository to kysely
* chore: add kysely codegen command, exclude from prettier and re-run it on latest migrations
* refactor: migrate map repository to kysely
* chore: dont log postgres notices
* Initial look at fixing issue where images are uploaded to the wrong album if a shared album conflicts with a local users album.
* Use owner instead of shared flag when fetching albums.
* Fix issue with refreshRemoteAlbums getting shared items twice and removed incorrect isShared comment.
Using `getAll(shared: true)` gets all shared albums the user can access (regardless of owner, despite the previous comment).
Using `getAll(shared: null)` gets all albums (incuding shared = true and shared = false). I presume the intent here was to get albums that were shared (and not mine), and not shared (ie: mine), but the logic is way off. It also just then combines them - so makes more sense to just get them in a single call.
* Fix formatting.
* Fixed tests.
* Revert "Fixed tests."
This reverts commit c38f5af5ac.
* Revert "Fix issue with refreshRemoteAlbums getting shared items twice and removed incorrect isShared comment."
This reverts commit 979ce90abf.
* Added comments to explain why filters behave the way they do for getAll() albums.
---------
Co-authored-by: Tom graham <tomg@questps.com.au>
Co-authored-by: Alex <alex.tran1502@gmail.com>
* setup ios
* chore: succesfully sent media to the app
* share from Android
* wip: navigate to share screen
* wip: UI for displaying upload candidate
* wip: logic
* wip: upload logic
* wip: up up up we got it up
* wip
* wip
* wip
* upload state
* feat: i18n
* fix: release build ios'
* feat: clear file cache
* pr feedback
* using const for checking download status
---------
Co-authored-by: Alex <alex@pop-os.localdomain>
fix(web): Change viewMode state after updateThumbnail
Fixes#14692
viewMode state was being changed before updateThumbnail which caused
AssetGrid.handleSelectAssets() to continue, instead of returning.
Also added notification to notify user that the album cover was
updated.
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Update config.py
* Add additional variables to preload part ML models
* Add additional variables to preload part ML models
* Apply formatting
* minor update
* formatting
* root validator
* minor update
* minor update
* minor update
* change to support explicit models
* minor update
* minor change
* minor change
* minor change
* minor update
* add logs, resolve errors
* minor change
* add new enviornment variables
* minor revisons
* remove comments
* chore(server): avoid copying sources in dev
Add a dev target to the web and server Dockerfiles, and change docker-compose.dev.yml to use the dev target. The dev target avoids copying files so that the docker image is smaller.
* chore: respond to PR: don't add dev target
web/Dockerfile is only used by docker-compose.dev.yml so a dev target is redundant. Instead, just remove the copy
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* refactor: migrate user repository to kysely
* refactor: migrate user repository to kysely
* refactor: migrate user repository to kysely
* refactor: migrate user repository to kysely
* fix: test
* clean up
* fix: metadata retrieval bug
* use correct typeing for upsert metadata
* pr feedback
* pr feedback
* fix: add deletedAt check
* fix: get non deleted user by default
* remove console.log
* fix: stop kysely after command finishes
* final clean up
---------
Co-authored-by: Jason Rasmussen <jason@rasm.me>
* auth
* URL switch
* mobile app
* caps
* headers, app changes
* oxford comma
* Match case to other use in Immich
* add url
* asset download also causes issues
* feat: toggle password visibility on shared albums
* feat: toggle password visibility on shared albums
* use password-field component
* remove div wrapping PasswordField
---------
Co-authored-by: Ian <ian@zetabyte.dev>
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Fixes # (issue)
## How Has This Been Tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
- [ ] Test A
- [ ] Test B
## Screenshots (if appropriate):
## Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation if applicable
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Fixes # (issue)
## How Has This Been Tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->
-f body="This issue has automatically been closed as it is likely a duplicate. We get a lot of duplicate threads each day, which is why we ask you in the template to confirm that you searched for duplicates before opening one. If you're sure this is not a duplicate, please leave a comment and we will reopen the thread if necessary." \
-f body="This discussion has automatically been closed as it is likely a duplicate. We get a lot of duplicate threads each day, which is why we ask you in the template to confirm that you searched for duplicates before opening one. If you're sure this is not a duplicate, please leave a comment and we will reopen the thread if necessary." \
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
should_run_.github:${{ steps.found_paths.outputs['.github'] == 'true' || steps.should_force.outputs.should_force == 'true' }}# redundant to have should_force but if someone changes the trigger then this won't have to be changed
Access the demo [here](https://demo.immich.app). The demo is running on a Free-tier Oracle VM in Amsterdam with a 2.4Ghz quad-core ARM64 CPU and 24GB RAM.
For the mobile app, you can use `https://demo.immich.app/api` for the `Server Endpoint URL`
Access the demo [here](https://demo.immich.app). For the mobile app, you can use `https://demo.immich.app` for the `Server Endpoint URL`.
### Login credentials
@@ -103,7 +102,7 @@ For the mobile app, you can use `https://demo.immich.app/api` for the `Server En
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
@@ -53,10 +53,18 @@ On iOS (iPhone and iPad), the operating system determines if a particular app ca
- Disable Background App Refresh for apps that don't need background tasks to run. This will reduce the competition for background task invocation for Immich.
- Use the Immich app more often.
### Why are features not working with a self-signed cert or mTLS?
### Why are features in the mobile app not working with a self-signed certificate, Basic Auth, custom headers, or mutual TLS?
Due to limitations in the upstream app/video library, using a self-signed TLS certificate or mutual TLS may break video playback or asset upload (both foreground and/or background).
We recommend using a real SSL certificate from a free provider, for example [Let's Encrypt](https://letsencrypt.org/).
These network features are experimental. They often do not work with video playback, asset upload or download, and other features.
Many of these limitations are tracked in [#15230](https://github.com/immich-app/immich/issues/15230).
Instead of these experimental features, we recommend using the URL switching feature, a VPN, or a [free trusted SSL certificate](https://letsencrypt.org/) for your domain.
We are not actively developing these features and will not be able to provide support, but welcome contributions to improve them.
Please discuss any large PRs with our dev team to ensure your time is not wasted.
### Why isn't the mobile app updated yet?
The app stores can take a few days to approve new builds of the app. If you're impatient, android APKs can be downloaded from the GitHub releases.
---
@@ -89,7 +97,7 @@ Make sure to [set your reverse proxy](/docs/administration/reverse-proxy/) to al
Also, check the disk space of your reverse proxy.
In some cases, proxies cache requests to disk before passing them on, and if disk space runs out, the request fails.
If you are using Cloudflare Tunnel, please know that they set a maxiumum filesize of 100 MB that cannot be changed.
If you are using Cloudflare Tunnel, please know that they set a maximum filesize of 100 MB that cannot be changed.
At times, files larger than this may work, potentially up to 1 GB. However, the official limit is 100 MB.
If you are having issues, we recommend switching to a different network deployment.
@@ -109,7 +117,7 @@ See [Backup and Restore](/docs/administration/backup-and-restore.md).
### Does Immich support reading existing face tag metadata?
No, it currently does not. There is an [open feature request on GitHub](https://github.com/immich-app/immich/discussions/4348).
Yes, it creates new faces and persons from the imported asset metadata. For details see the [feature request #4348](https://github.com/immich-app/immich/discussions/4348) and [PR #6455](https://github.com/immich-app/immich/pull/6455).
### Does Immich support the filtering of NSFW images?
@@ -156,6 +164,35 @@ For example, say you have existing transcodes with the policy "Videos higher tha
No. Our design principle is that the original assets should always be untouched.
### How can I mount a CIFS/Samba volume within Docker?
If you aren't able to or prefer not to mount Samba on the host (such as Windows environment), you can mount the volume within Docker.
Below is an example in the `docker-compose.yml`.
Change your username, password, local IP, and share name, and see below where the line `- originals:/usr/src/app/originals`,
correlates to the section where the volume `originals` was created. You can call this whatever you like, and map it to the docker container as you like.
For example you could change `originals:` to `Photos:`, and change `- originals:/usr/src/app/originals` to `Photos:/usr/src/app/photos`.
```diff
...
services:
immich-server:
...
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
+ - originals:/usr/src/app/originals
...
volumes:
model-cache:
+ originals:
+ driver_opts:
+ type: cifs
+ o: 'iocharset=utf8,username=USERNAMEHERE,password=PASSWORDHERE,rw' # change to `ro` if read only desired
+ device: '//localipaddress/sharename'
```
---
## Albums
@@ -225,7 +262,7 @@ No, this is not supported. Only models listed in the [Hugging Face][huggingface]
### I want to be able to search in other languages besides English. How can I do that?
You can change to a multilingual CLIP model. See [here](/docs/features/searching#clip-model) for instructions.
You can change to a multilingual CLIP model. See [here](/docs/features/searching#clip-models) for instructions.
### Does Immich support Facial Recognition for videos?
@@ -278,7 +315,7 @@ The initial backup is the most intensive due to the number of jobs running. The
- For facial recognition on new images to work properly, You must re-run the Face Detection job for all images after this.
- At the container level, you can [set resource constraints](/docs/FAQ#can-i-limit-cpu-and-ram-usage) to lower usage further.
- It's recommended to only apply these constraints _after_ taking some of the measures here for best performance.
- If these changes are not enough, see [below](/docs/FAQ#how-can-i-disable-machine-learning) for instructions on how to disable machine learning.
- If these changes are not enough, see [above](/docs/FAQ#how-can-i-disable-machine-learning) for instructions on how to disable machine learning.
### Can I limit CPU and RAM usage?
@@ -421,7 +458,7 @@ A result of `on` means that checksums are enabled.
@@ -436,7 +473,7 @@ If checksums are enabled, you can check the status of the database with the foll
<summary>Check for database corruption</summary>
```bash
docker exec -it immich_postgres psql --dbname=immich --username=<DB_USERNAME> --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL"
docker exec -it immich_postgres psql --dbname=postgres --username=<DB_USERNAME> --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL"
@@ -23,16 +23,32 @@ Refer to the official [postgres documentation](https://www.postgresql.org/docs/c
It is not recommended to directly backup the `DB_DATA_LOCATION` folder. Doing so while the database is running can lead to a corrupted backup that cannot be restored.
:::
### Automatic Database Backups
### Automatic Database Dumps
For convenience, Immich will automatically create database backups by default. The backups are stored in `UPLOAD_LOCATION/backups`.
As mentioned above, you should make your own backup of these together with the asset folders as noted below.
You can adjust the schedule and amount of kept backups in the [admin settings](http://my.immich.app/admin/system-settings?isOpen=backup).
By default, Immich will keep the last 14 backups and create a new backup every day at 2:00 AM.
:::warning
The automatic database dumps can be used to restore the database in the event of damage to the Postgres database files.
There is no monitoring for these dumps and you will not be notified if they are unsuccessful.
:::
:::caution
The database dumps do **NOT** contain any pictures or videos, only metadata. They are only usable with a copy of the other files in `UPLOAD_LOCATION` as outlined below.
:::
For disaster-recovery purposes, Immich will automatically create database dumps. The dumps are stored in `UPLOAD_LOCATION/backups`.
Please be sure to make your own, independent backup of the database together with the asset folders as noted below.
You can adjust the schedule and amount of kept database dumps in the [admin settings](http://my.immich.app/admin/system-settings?isOpen=backup).
By default, Immich will keep the last 14 database dumps and create a new dump every day at 2:00 AM.
#### Trigger Dump
You are able to trigger a database dump in the [admin job status page](http://my.immich.app/admin/jobs-status).
Visit the page, open the "Create job" modal from the top right, select "Create Database Dump" and click "Confirm".
A job will run and trigger a dump, you can verify this worked correctly by checking the logs or the `backups/` folder.
This dumps will count towards the last `X` dumps that will be kept based on your settings.
#### Restoring
We hope to make restoring simpler in future versions, for now you can find the backups in the `UPLOAD_LOCATION/backups` folder on your host.
We hope to make restoring simpler in future versions, for now you can find the database dumps in the `UPLOAD_LOCATION/backups` folder on your host.
Then please follow the steps in the following section for restoring the database.
### Manual Backup and Restore
@@ -41,7 +57,7 @@ Then please follow the steps in the following section for restoring the database
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
## You should mount the backup (as a volume, example: - 'C:\path\to\backup\dump.sql':/dump.sql) into the immich_postgres container using the docker-compose.yml
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
docker exec -it immich_postgres bash # Enter the Docker shell and run the following command
# Check the database user if you deviated from the default
docker compose up -d # Start remainder of Immich apps
## You should mount the backup (as a volume, example: `- 'C:\path\to\backup\dump.sql:/dump.sql'`) into the immich_postgres container using the docker-compose.yml
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
docker exec -it immich_postgres bash # Enter the Docker shell and run the following command
# Check the database user if you deviated from the default. If your backup ends in `.gz`, replace `cat` with `gunzip --stdout`
docker compose up -d # Start remainder of Immich apps
```
</TabItem>
@@ -95,12 +109,14 @@ Some deployment methods make it difficult to start the database without also sta
## Filesystem
Immich stores two types of content in the filesystem: (1) original, unmodified assets (photos and videos), and (2) generated content. Only the original content needs to be backed-up, which is stored in the following folders:
Immich stores two types of content in the filesystem: (a) original, unmodified assets (photos and videos), and (b) generated content. We recommend backing up the entire contents of `UPLOAD_LOCATION`, but only the original content is critical, which is stored in the following folders:
1. `UPLOAD_LOCATION/library`
2. `UPLOAD_LOCATION/upload`
3. `UPLOAD_LOCATION/profile`
If you choose to back up only those folders, you will need to rerun the transcoding and thumbnail generation jobs for all assets after you restore from a backup.
:::caution
If you moved some of these folders onto a different storage device, such as `profile/`, make sure to adjust the backup path to match your setup
:::
@@ -134,12 +150,10 @@ for more info read the [release notes](https://github.com/immich-app/immich/rele
- Preview images (small thumbnails and large previews) for each asset and thumbnails for recognized faces.
- Stored in `UPLOAD_LOCATION/thumbs/<userID>`.
- **Encoded Assets:**
- Videos that have been re-encoded from the original for wider compatibility. The original is not removed.
- Stored in `UPLOAD_LOCATION/encoded-video/<userID>`.
- **Postgres**
- The Immich database containing all the information to allow the system to function properly.
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
- Stored in `DB_DATA_LOCATION`.
@@ -185,7 +199,6 @@ When you turn off the storage template engine, it will leave the assets in `UPLO
- Temporarily located in `UPLOAD_LOCATION/upload/<userID>`.
- Transferred to `UPLOAD_LOCATION/library/<userID>` upon successful upload.
- **Postgres**
- The Immich database containing all the information to allow the system to function properly.
**Note:** This folder will only appear to users who have made the changes mentioned in [v1.102.0](https://github.com/immich-app/immich/discussions/8930) (an optional, non-mandatory change) or who started with this version.
- Stored in `DB_DATA_LOCATION`.
@@ -203,3 +216,10 @@ When you turn off the storage template engine, it will leave the assets in `UPLO
Do not touch the files inside these folders under any circumstances except taking a backup. Changing or removing an asset can cause untracked and missing files.
You can think of it as App-Which-Must-Not-Be-Named, the only access to viewing, changing and deleting assets is only through the mobile or browser interface.
:::
## Backup ordering
A backup of Immich should contain both the database and the asset files. When backing these up it's possible for them to get out of sync, potentially resulting in broken assets after you restore.
The best way of dealing with this is to stop the immich-server container while you take a backup. If nothing is changing then the backup will always be in sync.
If stopping the container is not an option, then the recommended order is to back up the database first, and the filesystem second. This way, the worst case scenario is that there are files on the filesystem that the database doesn't know about. If necessary, these can be (re)uploaded manually after a restore. If the backup is done the other way around, with the filesystem first and the database second, it's possible for the restored database to reference files that aren't in the filesystem backup, thus resulting in broken assets.
When a new asset is uploaded it kicks off a series of jobs, which include metadata extraction, thumbnail generation, machine learning tasks, and storage template migration, if enabled. To view the status of a job navigate to the Administration -> Jobs page.
Additionally, some jobs run on a schedule, which is every night at midnight. This schedule, with the exception of [External Libraries](/docs/features/libraries) scanning, cannot be changed.
Additionally, some jobs (such as memories generation) run on a schedule, which is every night at midnight by default. To change when they run or enable/disable a job navigate to System Settings -> [Nightly Tasks Settings](https://my.immich.app/admin/system-settings?isOpen=nightly-tasks).
@@ -20,7 +20,6 @@ Immich supports 3rd party authentication via [OpenID Connect][oidc] (OIDC), an i
Before enabling OAuth in Immich, a new client application needs to be configured in the 3rd-party authentication server. While the specifics of this setup vary from provider to provider, the general approach should be the same.
1. Create a new (Client) Application
1. The **Provider** type should be `OpenID Connect` or `OAuth2`
2. The **Client type** should be `Confidential`
3. The **Application** type should be `Web`
@@ -29,7 +28,6 @@ Before enabling OAuth in Immich, a new client application needs to be configured
2. Configure Redirect URIs/Origins
The **Sign-in redirect URIs** should include:
-`app.immich:///oauth-callback` - for logging in with OAuth from the [Mobile App](/docs/features/mobile-app.mdx)
-`http://DOMAIN:PORT/auth/login` - for logging in with OAuth from the Web Client
-`http://DOMAIN:PORT/user-settings` - for manually linking OAuth in the Web Client
@@ -37,21 +35,17 @@ Before enabling OAuth in Immich, a new client application needs to be configured
Redirect URIs should contain all the domains you will be using to access Immich. Some examples include:
Mobile
-`app.immich:///oauth-callback` (You **MUST** include this for iOS and Android mobile apps to work properly)
Localhost
-`http://localhost:2283/auth/login`
-`http://localhost:2283/user-settings`
Local IP
-`http://192.168.0.200:2283/auth/login`
-`http://192.168.0.200:2283/user-settings`
Hostname
-`https://immich.example.com/auth/login`
-`https://immich.example.com/user-settings`
@@ -68,8 +62,9 @@ Once you have a new OAuth client application configured, Immich can be configure
| Scope | string | openid email profile | Full list of scopes to send with the request (space delimited) |
| Signing Algorithm | string | RS256 | The algorithm used to sign the id token (examples: RS256, HS256) |
| Storage Label Claim | string | preferred_username | Claim mapping for the user's storage label**¹** |
| Role Claim | string | immich_role | Claim mapping for the user's role. (should return "user" or "admin")**¹** |
| Storage Quota Claim | string | immich_quota | Claim mapping for the user's storage**¹** |
| Default Storage Quota (GiB) | number | 0 | Default quota for user without storage quota claim (Enter 0 for unlimited quota) |
| Default Storage Quota (GiB) | number | 0 | Default quota for user without storage quota claim (empty for unlimited quota) |
| Button Text | string | Login with OAuth | Text for the OAuth button on the web |
| Auto Register | boolean | true | When true, will automatically register a user the first time they sign in |
| [Auto Launch](#auto-launch) | boolean | false | When true, will skip the login page and automatically start the OAuth login process |
@@ -93,6 +88,7 @@ The `.well-known/openid-configuration` part of the url is optional and will be a
## Auto Launch
When Auto Launch is enabled, the login page will automatically redirect the user to the OAuth authorization url, to login with OAuth. To access the login screen again, use the browser's back button, or navigate directly to `/auth/login?autoLaunch=0`.
Auto Launch can also be enabled on a per-request basis by navigating to `/auth/login?authLaunch=1`, this can be useful in situations where Immich is called from e.g. Nextcloud using the _External sites_ app and the _oidc_ app so as to enable users to directly interact with a logged-in instance of Immich.
## Mobile Redirect URI
@@ -110,6 +106,89 @@ Immich has a route (`/api/oauth/mobile-redirect`) that is already configured to
## Example Configuration
<details>
<summary>Authelia Example</summary>
### Authelia Example
Here's an example of OAuth configured for Authelia:
This assumes there exist an attribute `immichquota` in the user schema, which is used to set the user's storage quota in Immich.
The configuration concerning the quota is optional.
```yaml
authentication_backend:
ldap:
# The LDAP server configuration goes here.
# See: https://www.authelia.com/c/ldap
attributes:
extra:
immichquota:# The attribute name from LDAP
name:'immich_quota'
multi_valued:false
value_type:'integer'
identity_providers:
oidc:
## The other portions of the mandatory OpenID Connect 1.0 configuration go here.
@@ -10,12 +10,16 @@ Running with a pre-existing Postgres server can unlock powerful administrative f
## Prerequisites
You must install pgvecto.rs into your instance of Postgres using their [instructions][vectors-install]. After installation, add `shared_preload_libraries = 'vectors.so'` to your `postgresql.conf`. If you already have some `shared_preload_libraries` set, you can separate each extension with a comma. For example, `shared_preload_libraries = 'pg_stat_statements, vectors.so'`.
You must install `pgvector` (`>= 0.7.0, < 1.0.0`), as it is a prerequisite for `vchord`.
The easiest way to do this on Debian/Ubuntu is by adding the [PostgreSQL Apt repository][pg-apt] and then
running `apt install postgresql-NN-pgvector`, where `NN` is your Postgres version (e.g., `16`).
You must install VectorChord into your instance of Postgres using their [instructions][vchord-install]. After installation, add `shared_preload_libraries = 'vchord.so'` to your `postgresql.conf`. If you already have some `shared_preload_libraries` set, you can separate each extension with a comma. For example, `shared_preload_libraries = 'pg_stat_statements, vchord.so'`.
:::note
Immich is known to work with Postgres versions 14, 15, and 16. Earlier versions are unsupported. Postgres 17 is nominally compatible, but pgvecto.rs does not have prebuilt images or packages for it as of writing.
Immich is known to work with Postgres versions `>= 14, < 18`.
Make sure the installed version of pgvecto.rs is compatible with your version of Immich. The current accepted range for pgvecto.rs is `>= 0.2.0, < 0.4.0`.
Make sure the installed version of VectorChord is compatible with your version of Immich. The current accepted range for VectorChord is `>= 0.3.0, < 0.5.0`.
ALTER DATABASE <immichdatabasename> OWNER TO <immichdbusername>;
CREATE EXTENSION vectors;
CREATE EXTENSION vchord CASCADE;
CREATE EXTENSION earthdistance CASCADE;
ALTER DATABASE <immichdatabasename> SET search_path TO "$user", public, vectors;
ALTER SCHEMA vectors OWNER TO <immichdbusername>;
COMMIT;
```
### Updating pgvecto.rs
### Updating VectorChord
When installing a new version of pgvecto.rs, you will need to manually update the extension by connecting to the Immich database and running `ALTER EXTENSION vectors UPDATE;`.
When installing a new version of VectorChord, you will need to manually update the extension and reindex by connecting to the Immich database and running:
### Common errors
```
ALTER EXTENSION vchord UPDATE;
REINDEX INDEX face_index;
REINDEX INDEX clip_index;
```
#### Permission denied for view
## Migrating to VectorChord
If you get the error `driverError: error: permission denied for view pg_vector_index_stat`, you can fix this by connecting to the Immich database and running `GRANT SELECT ON TABLE pg_vector_index_stat TO <immichdbusername>;`.
VectorChord is the successor extension to pgvecto.rs, allowing for higher performance, lower memory usage and higher quality results for smart search and facial recognition.
Support for pgvecto.rs will be dropped in a later release, hence we recommend all users currently using pgvecto.rs to migrate to VectorChord at their convenience. There are two primary approaches to do so.
The easiest option is to have both extensions installed during the migration:
<details>
<summary>Migration steps (automatic)</summary>
1. Ensure you still have pgvecto.rs installed
2. Install `pgvector` (`>= 0.7.0, < 1.0.0`). The easiest way to do this is on Debian/Ubuntu by adding the [PostgreSQL Apt repository][pg-apt] and then running `apt install postgresql-NN-pgvector`, where `NN` is your Postgres version (e.g., `16`)
3. [Install VectorChord][vchord-install]
4. Add `shared_preload_libraries= 'vchord.so, vectors.so'` to your `postgresql.conf`, making sure to include _both_ `vchord.so` and `vectors.so`. You may include other libraries here as well if needed
5. Restart the Postgres database
6. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;` using psql or your choice of database client
7. Start Immich and wait for the logs `Reindexed face_index` and `Reindexed clip_index` to be output
8. If Immich does not have superuser permissions, run the SQL command `DROP EXTENSION vectors;`
9. Drop the old schema by running `DROP SCHEMA vectors;`
10. Remove the `vectors.so` entry from the `shared_preload_libraries` setting
11. Restart the Postgres database
12. Uninstall pgvecto.rs (e.g. `apt-get purge vectors-pg14` on Debian-based environments, replacing `pg14` as appropriate). `pgvector` must remain installed as it provides the data types used by `vchord`
</details>
If it is not possible to have both VectorChord and pgvecto.rs installed at the same time, you can perform the migration with more manual steps:
<details>
<summary>Migration steps (manual)</summary>
1. While pgvecto.rs is still installed, run the following SQL command using psql or your choice of database client. Take note of the number outputted by this command as you will need it later
```sql
SELECT atttypmod as dimsize
FROM pg_attribute f
JOIN pg_class c ON c.oid = f.attrelid
WHERE c.relkind = 'r'::char
AND f.attnum > 0
AND c.relname = 'smart_search'::text
AND f.attname = 'embedding'::text;
```
2. Remove references to pgvecto.rs using the below SQL commands
```sql
DROP INDEX IF EXISTS clip_index;
DROP INDEX IF EXISTS face_index;
ALTER TABLE smart_search ALTER COLUMN embedding SET DATA TYPE real[];
ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE real[];
```
3. [Install VectorChord][vchord-install]
4. Change the columns back to the appropriate vector types, replacing `<number>` with the number from step 1
```sql
CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
ALTER TABLE smart_search ALTER COLUMN embedding SET DATA TYPE vector(<number>);
ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE vector(512);
```
5. Start Immich and let it create new indices using VectorChord
</details>
### Migrating from pgvector
<details>
<summary>Migration steps</summary>
1. Ensure you have at least 0.7.0 of pgvector installed. If it is below that, please upgrade it and run the SQL command `ALTER EXTENSION vector UPDATE;` using psql or your choice of database client
2. Follow the Prerequisites to install VectorChord
3. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;`
4. Remove the `DB_VECTOR_EXTENSION=pgvector` environmental variable as it will make Immich still use pgvector if set
5. Start Immich and let it create new indices using VectorChord
</details>
Note that VectorChord itself uses pgvector types, so you should not uninstall pgvector after following these steps.
Users can deploy a custom reverse proxy that forwards requests to Immich. This way, the reverse proxy can handle TLS termination, load balancing, or other advanced features. All reverse proxies between Immich and the user must forward all headers and set the `Host`, `X-Real-IP`, `X-Forwarded-Proto` and `X-Forwarded-For` headers to their appropriate values. Additionally, your reverse proxy should allow for big enough uploads. By following these practices, you ensure that all custom reverse proxies are fully compatible with Immich.
:::note
The Repair page can take a long time to load. To avoid server timeouts or errors, we recommend specifying a timeout of at least 10 minutes on your proxy server.
:::
:::caution
Immich does not support being served on a sub-path such as `location /immich {`. It has to be served on the root path of a (sub)domain.
@@ -98,6 +98,14 @@ The default Immich log level is `Log` (commonly known as `Info`). The Immich adm
Through this setting, you can manage all the settings related to machine learning in Immich, from the setting of remote machine learning to the model and its parameters
You can choose to disable a certain type of machine learning, for example smart search or facial recognition.
### URL
The built in (`http://immich-machine-learning:3003`) machine learning server will be configured by default, but you can change this or add additional servers.
Hosting the `immich-machine-learning` container on a machine with a more powerful GPU can be helpful to for processing a large number of photos (such as during batch import) or for faster search.
If more than one URL is provided, each server will be attempted one-at-a-time until one responds successfully, in order from first to last. Servers that don't respond will be temporarily ignored until they come back online.
### Smart Search
The [smart search](/docs/features/searching) settings allow you to change the [CLIP model](https://openai.com/research/clip). Larger models will typically provide [more accurate search results](https://github.com/immich-app/immich/discussions/11862) but consume more processing power and RAM. When [changing the CLIP model](/docs/FAQ#can-i-use-a-custom-clip-model) it is mandatory to re-run the Smart Search job on all images to fully apply the change.
@@ -31,7 +31,7 @@ Admin can send a welcome email if the Email option is set, you can learn here ho
Admin can specify the storage quota for the user as the instance's admin; once the limit is reached, the user won't be able to upload to the instance anymore.
In order to select a storage quota, click on the pencil icon and enter the storage quota in GiB. You can choose an unlimited quota using the value 0 (default).
In order to select a storage quota, click on the pencil icon and enter the storage quota in GiB. You can choose an unlimited quota by leaving it empty (default).
:::tip
The system administrator can see the usage quota percentage of all users in Server Stats page.
1. `redis`- Queue management for `immich-microservices`
1. `redis`- Queue management for background jobs
### Immich Server
The Immich Server is a [TypeScript](https://www.typescriptlang.org/) project written for [Node.js](https://nodejs.org/). It uses the [Nest.js](https://nestjs.com) framework, with [TypeORM](https://typeorm.io/) for database management. The server codebase also loosely follows the [Hexagonal Architecture](<https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)>). Specifically, we aim to separate technology specific implementations (`infra/`) from core business logic (`domain/`).
The Immich Server is a [TypeScript](https://www.typescriptlang.org/) project written for [Node.js](https://nodejs.org/). It uses the [Nest.js](https://nestjs.com) framework, [Express](https://expressjs.com/) server, and the query builder [Kysely](https://kysely.dev/). The server codebase also loosely follows the [Hexagonal Architecture](<https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)>). Specifically, we aim to separate technology specific implementations (`src/repositories`) from core business logic (`src/services`).
#### REST Endpoints
### API Endpoints
The server is a list of HTTP endpoints and associated handlers (controllers). Each controller usually implements the following CRUD operations:
An incoming HTTP request is mapped to a controller (`src/controllers`). Controllers are collections of HTTP endpoints. Each controller usually implements the following CRUD operations for its respective resource type:
- `POST` `/<type>` - **Create**
- `GET` `/<type>` - **Read** (all)
@@ -70,13 +69,13 @@ The server is a list of HTTP endpoints and associated handlers (controllers). Ea
- `PUT` `/<type>/:id` - **Updated** (by id)
- `DELETE` `/<type>/:id` - **Delete** (by id)
#### DTOs
### Domain Transfer Objects (DTOs)
The server uses [Domain Transfer Objects](https://en.wikipedia.org/wiki/Data_transfer_object) as public interfaces for the inputs (query, params, and body) and outputs (response) for each endpoint. DTOs translate to [OpenAPI](./open-api.md) schemas and control the generated code used by each client.
### Microservices
### Background Jobs
The Immich Microservices image uses the same `Dockerfile` as the Immich Server, but with a different entrypoint. The Immich Microservices service mainly handles executing jobs, which include the following:
Immich uses a [worker](https://github.com/immich-app/immich/blob/main/server/src/utils/misc.ts#L266) to run background jobs. These jobs include:
After making any changes in the `server/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
After making any changes in the `server/src/schema`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
1. Run the command
```bash
npm run typeorm:migrations:generate <migration-name>
npm run migrations:generate <migration-name>
```
2. Check if the migration file makes sense.
3. Move the migration file to folder `./server/src/migrations` in your code editor.
3. Move the migration file to folder `./server/src/schema/migrations` in your code editor.
The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately.
Dev Containers provide a consistent, reproducible development environment using Docker containers. With a single click, you can get started with an Immich development environment on Mac, Linux, Windows, or in the cloud using GitHub Codespaces.
Get started fast!
[](https://codespaces.new/immich-app/immich/)
[Learn more about Dev Containers](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers)
| Server & Web | `immich-server` | Runs both API server and web frontend in development mode | 2283 (API)<br/>3000 (Web)<br/>9230 (Workers Debug)<br/>9231 (API Debug) |
The immich dev containers read environment variables from your shell environment, not from `.env` files. This allows them to work in cloud environments without pre-configuration.
:::important Configuration
When running locally, and if you want to create (or use an existing) DB and/or photo storage folder, you must set the `UPLOAD_LOCATION` variable in your shell environment before launching the Dev Container. This determines where uploaded files are stored and also where the DB stores it data.
Immich development makes extensive use of specialized [base images](https://github.com/immich-app/base-images) for its docker-compose based development. For this reason, you won't be able to use VSCode's **_Clone Repository in a Container Volume_** command.
:::
#### Using VS Code UI:
1. Open the cloned repository in VS Code
2. Press `F1` or `Ctrl/Cmd+Shift+P` to open the command palette
3. Type and select "Dev Containers: Rebuild and Reopen in Container"
4. Select "Immich - Backend, Frontend and ML" from the list
5. Wait for the container to build and start (this may take several minutes on first run)
#### Using VS Code Quick Actions:
1. Open the repository in VS Code
2. You should see a popup asking if you want to reopen in a container
3. Click "Reopen in Container"
#### Using Command Line:
```bash
# Using the DevContainer CLI
devcontainer up --workspace-folder .
```
## Environment Variable Details
### How Dev Containers Handle Environment Variables
Unlike the Immich developer setup based on Docker Compose which uses `.env` files, Immich Dev Containers read environment variables from your shell environment. This is configured in `.devcontainer/devcontainer.json`:
Add these to your shell profile (`~/.bashrc`, `~/.zshrc`, `~/.bash_profile`, etc.):
```bash
# Required
exportUPLOAD_LOCATION=./Library # or absolute path
# Optional (only if using non-default values)
exportDB_PASSWORD=your_password
exportDB_USERNAME=your_username
exportDB_DATABASE_NAME=your_database
```
Remember to reload your shell configuration:
```bash
source ~/.bashrc # or ~/.zshrc, etc.
```
## Git Configuration
### SSH Keys and Authentication
To use your SSH keys for GitHub access inside the Dev Container:
1.**Start SSH Agent** on your host machine:
```bash
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa # or your key path
```
2. **VS Code automatically forwards your SSH agent** to the container
For detailed instructions, see the [VS Code guide on sharing Git credentials](https://code.visualstudio.com/remote/advancedcontainers/sharing-git-credentials).
### Commit Signing
To use your SSH key for commit signing, see the [GitHub guide on SSH commit signing](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key#telling-git-about-your-ssh-key).
@@ -38,6 +38,19 @@ Run all server checks with `npm run check:all`
You can use `npm run __:fix` to potentially correct some issues automatically for `npm run format` and `lint`.
:::
## Mobile Checks
The following commands must be executed from within the mobile app directory of the codebase.
- [ ]`make build` (auto-generate files using build_runner)
- [ ]`make analyze` (static analysis via Dart Analyzer and DCM)
- [ ]`make format` (formatting via Dart Formatter)
- [ ]`make test` (unit tests)
:::info Auto Fix
You can use `dart fix --apply` and `dcm fix lib` to potentially correct some issues automatically for `make analyze`.
:::
## OpenAPI
The OpenAPI client libraries need to be regenerated whenever there are changes to the `immich-openapi-specs.json` file. Note that you should not modify this file directly as it is auto-generated. See [OpenAPI](/docs/developer/open-api.md) for more details.
To see local changes to `@immich/ui` in Immich, do the following:
1. Install `@immich/ui` as a sibling to `immich/`, for example `/home/user/immich` and `/home/user/ui`
2. Build the `@immich/ui` project via `npm run build`
3. Uncomment the corresponding volume in web service of the `docker/docker-compose.dev.yaml` file (`../../ui:/usr/ui`)
4. Uncomment the corresponding alias in the `web/vite.config.js` file (`'@immich/ui': path.resolve(\_\_dirname, '../../ui')`)
5. Uncomment the import statement in `web/src/app.css` file `@import '/usr/ui/dist/theme/default.css';` and comment out `@import '@immich/ui/theme/default.css';`
6. Start up the stack via `make dev`
7. After making changes in `@immich/ui`, rebuild it (`npm run build`)
### Mobile app
The mobile app `(/mobile)` will required Flutter toolchain 3.13.x to be installed on your system.
#### Setup
Please refer to the [Flutter's official documentation](https://flutter.dev/docs/get-started/install) for more information on setting up the toolchain on your machine.
1. Setup Flutter toolchain using FVM.
2. Run `flutter pub get` to install the dependencies.
3. Run `make translation` to generate the translation file.
4. Run `fvm flutter run` to start the app.
#### Translation
To add a new translation text, enter the key-value pair in the `i18n/en.json` in the root of the immich project. Then, from the `mobile/` directory, run
```bash
make translation
```
The mobile app asks you what backend to connect to. You can utilize the demo backend (https://demo.immich.app/) if you don't need to change server code or upload photos. Alternatively, you can run the server yourself per the instructions above.
@@ -85,32 +115,72 @@ Note: Activating the license is not required.
### VSCode
Install `Flutter`, `DCM`, `Prettier`, `ESLint` and `Svelte` extensions.
Install `Flutter`, `DCM`, `Prettier`, `ESLint` and `Svelte` extensions. These extensions are listed in the `extensions.json` file under `.vscode/` and should appear as workspace recommendations.
in User `settings.json` (`cmd + shift + p` and search for `Open User Settings JSON`) add the following:
Here are the settings we use, they should be active as workspace settings (`settings.json`):
Immich supports the Google's Cast protocol so that photos and videos can be cast to devices such as a Chromecast and a Nest Hub. This feature is considered experimental and has several important limitations listed below. Currently, this feature is only supported by the web client, support on Android and iOS is planned for the future.
## Enable Google Cast Support
Google Cast support is disabled by default. The web UI uses Google-provided scripts and must retreive them from Google servers when the page loads. This is a privacy concern for some and is thus opt-in.
You can enable Google Cast support through `Account Settings > Features > Cast > Google Cast`
<img src={require('./img/gcast-enable.webp').default} width="70%" title='Enable Google Cast Support' />
## Limitations
To use casting with Immich, there are a few prerequisites:
1. Your instance must be accessed via an HTTPS connection in order for the casting menu to show.
2. Your instance must be publicly accessible via HTTPS and a DNS record for the server must be accessible via Google's DNS servers (`8.8.8.8` and `8.8.4.4`)
3. Videos must be in a format that is compatible with Google Cast. For more info, check out [Google's documentation](https://developers.google.com/cast/docs/media)
Please modify the `IMMICH_INSTANCE_URL` and `IMMICH_API_KEY` environment variables as suitable. You can also use a Docker env file to store your sensitive API key.
This `docker run` command will directly run the command `immich` inside the container. You can directly append the desired parameters (see under "usage") to the commandline like this:
```bash
docker run -it -v "$(pwd)":/import:ro -e IMMICH_INSTANCE_URL=https://your-immich-instance/api -e IMMICH_API_KEY=your-api-key ghcr.io/immich-app/immich-cli:latest upload -a -c 5 --recursive directory/
This will store your credentials in a `auth.yml` file in the configuration directory which defaults to `~/.config/`. The directory can be set with the `-d` option or the environment variable `IMMICH_CONFIG_DIR`. Please keep the file secure, either by performing the logout command after you are done, or deleting it manually.
This will store your credentials in a `auth.yml` file in the configuration directory which defaults to `~/.config/immich/`. The directory can be set with the `-d` option or the environment variable `IMMICH_CONFIG_DIR`. Please keep the file secure, either by performing the logout command after you are done, or deleting it manually.
Once you are authenticated, you can upload assets to your Immich server.
@@ -166,6 +175,16 @@ By default, hidden files are skipped. If you want to include hidden files, use t
It's better to only tweak the parameters here than to set them to something very different unless you're ready to test a variety of options. If you do need to set a parameter to a strict setting, relaxing other settings can be a good option to compensate, and vice versa.
You can learn how the tune the result in this [Guide](/docs/guides/better-facial-clusters)
Folder view provides an additional view besides the timeline that is similar to a file explorer. It allows you to navigate through the folders and files in the library. This feature is handy for a highly curated and customized external library or a nicely configured storage template.
You can enable this feature under [`Account Settings > Features > Folder View`](https://my.immich.app/user-settings?isOpen=feature+folders)
You can enable this feature under [`Account Settings > Features > Folders`](https://my.immich.app/user-settings?isOpen=feature+folders)
@@ -37,7 +37,7 @@ To validate that Immich can reach your external library, start a shell inside th
### Exclusion Patterns
By default, all files in the import paths will be added to the library. If there are files that should not be added, exclusion patterns can be used to exclude them. Exclusion patterns are glob patterns are matched against the full file path. If a file matches an exclusion pattern, it will not be added to the library. Exclusion patterns can be added in the Scan Settings page for each library. Under the hood, Immich uses the [glob](https://www.npmjs.com/package/glob) package to match patterns, so please refer to [their documentation](https://github.com/isaacs/node-glob#glob-primer) to see what patterns are supported.
By default, all files in the import paths will be added to the library. If there are files that should not be added, exclusion patterns can be used to exclude them. Exclusion patterns are glob patterns are matched against the full file path. If a file matches an exclusion pattern, it will not be added to the library. Exclusion patterns can be added in the Scan Settings page for each library.
Some basic examples:
@@ -48,17 +48,21 @@ Some basic examples:
Special characters such as @ should be escaped, for instance:
-`**/\@eadir/**` will exclude all files in any directory named `@eadir`
-`**/\@eaDir/**` will exclude all files in any directory named `@eaDir`
:::info
Internally, Immich uses the [glob](https://www.npmjs.com/package/glob) package to process exclusion patterns, and sometimes those patterns are translated into [Postgres LIKE patterns](https://www.postgresql.org/docs/current/functions-matching.html). The intention is to support basic folder exclusions but we recommend against advanced usage since those can't reliably be translated to the Postgres syntax. Please refer to the [glob documentation](https://github.com/isaacs/node-glob#glob-primer) for a basic overview on glob patterns.
:::
### Automatic watching (EXPERIMENTAL)
This feature - currently hidden in the config file - is considered experimental and for advanced users only. If enabled, it will allow automatic watching of the filesystem which means new assets are automatically imported to Immich without needing to rescan.
This feature is considered experimental and for advanced users only. If enabled, it will allow automatic watching of the filesystem which means new assets are automatically imported to Immich without needing to rescan.
If your photos are on a network drive, automatic file watching likely won't work. In that case, you will have to rely on a periodic library refresh to pull in your changes.
If your photos are on a network drive, automatic file watching likely won't work. In that case, you will have to rely on a [periodic library refresh](#set-custom-scan-interval) to pull in your changes.
#### Troubleshooting
If you encounter an `ENOSPC` error, you need to increase your file watcher limit. In sysctl, this key is called `fs.inotify.max_user_watched` and has a default value of 8192. Increase this number to a suitable value greater than the number of files you will be watching. Note that Immich has to watch all files in your import paths including any ignored files.
If you encounter an `ENOSPC` error, you need to increase your file watcher limit. In sysctl, this key is called `fs.inotify.max_user_watches` and has a default value of 8192. Increase this number to a suitable value greater than the number of files you will be watching. Note that Immich has to watch all files in your import paths including any ignored files.
```
ERROR [LibraryService] Library watcher for library c69faf55-f96d-4aa0-b83b-2d80cbc27d98 encountered error: Error: ENOSPC: System limit for number of file watchers reached, watch '/media/photo.jpg'
@@ -68,7 +72,9 @@ In rare cases, the library watcher can hang, preventing Immich from starting up.
### Nightly job
There is an automatic scan job that is scheduled to run once a day. This job also cleans up any libraries stuck in deletion.
There is an automatic scan job that is scheduled to run once a day. Its schedule is configurable, see [Set Custom Scan Interval](#set-custom-scan-interval).
This job also cleans up any libraries stuck in deletion. It is possible to trigger the cleanup by clicking "Scan all libraries" in the library management page.
## Usage
@@ -87,11 +93,11 @@ The `immich-server` container will need access to the gallery. Modify your docke
+ - /mnt/media/videos2:/mnt/media/videos2 # the files in this folder can be deleted, as it does not end with :ro
+ - /mnt/media/videos2:/mnt/media/videos2 # WARNING: Immich will be able to delete the files in this folder, as it does not end with :ro
+ - "C:/Users/user_name/Desktop/my media:/mnt/media/my-media:ro" # import path in Windows system.
```
@@ -108,14 +114,16 @@ _Remember to run `docker compose up -d` to register the changes. Make sure you c
These actions must be performed by the Immich administrator.
- Click on Administration -> Libraries
- Click on Create External Library
- Click on your avatar in the upper right corner
- Click on Administration -> External Libraries
- Click on Create an external library…
- Select which user owns the library, this can not be changed later
- Enter `/mnt/media/christmas-trip` then click Add
- Click on Save
- Click the drop-down menu on the newly created library
- Click on Scan
- Click the drop-down menu on the newly created library
- Click on Rename Library and rename it to "Christmas Trip"
- Click Edit Import Paths
- Click on Add Path
- Enter `/mnt/media/christmas-trip` then click Add
NOTE: We have to use the `/mnt/media/christmas-trip` path and not the `/mnt/nas/christmas-trip` path since all paths have to be what the Docker containers see.
@@ -153,9 +161,7 @@ Within seconds, the assets from the old-pics and videos folders should show up i
Folder view provides an additional view besides the timeline that is similar to a file explorer. It allows you to navigate through the folders and files in the library. This feature is handy for a highly curated and customized external library or a nicely configured storage template.
You can enable this feature under [`Account Settings > Features > Folder View`](https://my.immich.app/user-settings?isOpen=feature+folders)
The UI is currently only available for the web; mobile will come in a subsequent release.
You can enable this feature under [`Account Settings > Features > Folders`](https://my.immich.app/user-settings?isOpen=feature+folders)
@@ -11,7 +11,9 @@ You do not need to redo any machine learning jobs after enabling hardware accele
- ARM NN (Mali)
- CUDA (NVIDIA GPUs with [compute capability](https://developer.nvidia.com/cuda-gpus) 5.2 or higher)
-OpenVINO (Intel discrete GPUs such as Iris Xe and Arc)
-ROCm (AMD GPUs)
- OpenVINO (Intel GPUs such as Iris Xe and Arc)
- RKNN (Rockchip)
## Limitations
@@ -19,6 +21,7 @@ You do not need to redo any machine learning jobs after enabling hardware accele
- Only Linux and Windows (through WSL2) servers are supported.
- ARM NN is only supported on devices with Mali GPUs. Other Arm devices are not supported.
- Some models may not be compatible with certain backends. CUDA is the most reliable.
- Search latency isn't improved by ARM NN due to model compatibility issues preventing its use. However, smart search jobs do make use of ARM NN.
## Prerequisites
@@ -33,29 +36,47 @@ You do not need to redo any machine learning jobs after enabling hardware accele
- The `hwaccel.ml.yml` file assumes the path to it is `/usr/lib/libmali.so`, so update accordingly if it is elsewhere
- The `hwaccel.ml.yml` file assumes an additional file `/lib/firmware/mali_csffw.bin`, so update accordingly if your device's driver does not require this file
- Optional: Configure your `.env` file, see [environment variables](/docs/install/environment-variables) for ARM NN specific settings
- In particular, the `MACHINE_LEARNING_ANN_FP16_TURBO` can significantly improve performance at the cost of very slightly lower accuracy
#### CUDA
- The GPU must have compute capability 5.2 or greater.
- The server must have the official NVIDIA driver installed.
- The installed driver must be >= 535 (it must support CUDA 12.2).
- The installed driver must be >= 545 (it must support CUDA 12.3).
- On Linux (except for WSL2), you also need to have [NVIDIA Container Toolkit][nvct] installed.
#### ROCm
- The GPU must be supported by ROCm. If it isn't officially supported, you can attempt to use the `HSA_OVERRIDE_GFX_VERSION` environmental variable: `HSA_OVERRIDE_GFX_VERSION=<a supported version, e.g. 10.3.0>`. If this doesn't work, you might need to also set `HSA_USE_SVM=0`.
- The ROCm image is quite large and requires at least 35GiB of free disk space. However, pulling later updates to the service through Docker will generally only amount to a few hundred megabytes as the rest will be cached.
- This backend is new and may experience some issues. For example, GPU power consumption can be higher than usual after running inference, even if the machine learning service is idle. In this case, it will only go back to normal after being idle for 5 minutes (configurable with the [MACHINE_LEARNING_MODEL_TTL](/docs/install/environment-variables) setting).
#### OpenVINO
-The server must have a discrete GPU, i.e. Iris Xe or Arc. Expect issues when attempting to use integrated graphics.
-Integrated GPUs are more likely to experience issues than discrete GPUs, especially for older processors or servers with low RAM.
- Ensure the server's kernel version is new enough to use the device for hardware accceleration.
- Expect higher RAM usage when using OpenVINO compared to CPU processing.
#### RKNN
- You must have a supported Rockchip SoC: only RK3566, RK3568, RK3576 and RK3588 are supported at this moment.
- Make sure you have the appropriate linux kernel driver installed
- This is usually pre-installed on the device vendor's Linux images
- RKNPU driver V0.9.8 or later must be available in the host server
- You may confirm this by running `cat /sys/kernel/debug/rknpu/version` to check the version
- Optional: Configure your `.env` file, see [environment variables](/docs/install/environment-variables) for RKNN specific settings
- In particular, setting `MACHINE_LEARNING_RKNN_THREADS` to 2 or 3 can _dramatically_ improve performance for RK3576 and RK3588 compared to the default of 1, at the expense of multiplying the amount of RAM each model uses by that amount.
## Setup
1. If you do not already have it, download the latest [`hwaccel.ml.yml`][hw-file] file and ensure it's in the same folder as the `docker-compose.yml`.
2. In the `docker-compose.yml` under `immich-machine-learning`, uncomment the `extends` section and change `cpu` to the appropriate backend.
3. Still in `immich-machine-learning`, add one of -[armnn, cuda, openvino] to the `image` section's tag at the end of the line.
3. Still in `immich-machine-learning`, add one of -[armnn, cuda, rocm, openvino, rknn] to the `image` section's tag at the end of the line.
4. Redeploy the `immich-machine-learning` container with these updated settings.
### Confirming Device Usage
You can confirm the device is being recognized and used by checking its utilization. There are many tools to display this, such as `nvtop` for NVIDIA or Intel and`intel_gpu_top` for Intel.
You can confirm the device is being recognized and used by checking its utilization. There are many tools to display this, such as `nvtop` for NVIDIA or Intel,`intel_gpu_top` for Intel, and `radeontop` for AMD.
You can also check the logs of the `immich-machine-learning` container. When a Smart Search or Face Detection job begins, or when you search with text in Immich, you should either see a log for `Available ORT providers` containing the relevant provider (e.g. `CUDAExecutionProvider` in the case of CUDA), or a `Loaded ANN model` log entry without errors in the case of ARM NN.
@@ -126,3 +147,12 @@ Note that you should increase job concurrencies to increase overall utilization
- If you encounter an error when a model is running, try a different model to see if the issue is model-specific.
- You may want to increase concurrency past the default for higher utilization. However, keep in mind that this will also increase VRAM consumption.
- Larger models benefit more from hardware acceleration, if you have the VRAM for them.
- Compared to ARM NN, RKNPU has:
- Wider model support (including for search, which ARM NN does not accelerate)
- Less heat generation
- Very slightly lower accuracy (RKNPU always uses FP16, while ARM NN by default uses higher precision FP32 unless `MACHINE_LEARNING_ANN_FP16_TURBO` is enabled)
- Varying speed (tested on RK3588):
- If `MACHINE_LEARNING_RKNN_THREADS` is at the default of 1, RKNPU will have substantially lower throughput for ML jobs than ARM NN in most cases, but similar latency (such as when searching)
- If `MACHINE_LEARNING_RKNN_THREADS` is set to 3, it will be somewhat faster than ARM NN at FP32, but somewhat slower than ARM NN if `MACHINE_LEARNING_ANN_FP16_TURBO` is enabled
- When other tasks also use the GPU (like transcoding), RKNPU has a significant advantage over ARM NN as it uses the otherwise idle NPU instead of competing for GPU usage
- Lower RAM usage if `MACHINE_LEARNING_RKNN_THREADS` is at the default of 1, but significantly higher if greater than 1 (which is necessary for it to fully utilize the NPU and hence be comparable in speed to ARM NN)
@@ -36,11 +36,15 @@ You can enable automatic backup on supported devices. For more information see [
If you have a large number of photos on the device, and you would prefer not to backup all the photos, then it might be prudent to only backup selected photos from device to the Immich server.
First, you need to enable the Storage Indicator in your app's settings. Navigate to **<ins>Settings -> Photo Grid</ins>** and enable **"Show Storage indicator on asset tiles"**; this makes it easy to distinguish local-only assets and synced assets.
:::note
This will enable a small cloud icon on the bottom right corner of the asset tile, indicating that the asset is synced to the server:
1. <Icon path={mdiCloudOffOutline} size={1} /> - Local-only asset; not synced to the server
2. <Icon path={mdiCloudCheckOutline} size={1} /> - Asset is synced to the server :::
2. <Icon path={mdiCloudCheckOutline} size={1} /> - Asset is synced to the server
:::
Now make sure that the local album is selected in the backup screen (steps 1-2 above). You can find these albums listed in **<ins>Library -> On this device</ins>**. To selectively upload photos from these albums, simply select the local-only photos and tap on "Upload" button in the dynamic bottom menu.
@@ -84,9 +88,9 @@ It will only reflect files you add.
:::
If the same asset is in more than one album it will only sync to the first album it's in, after that it won't sync again even if the user clicks sync albums manually.
To overcome this limitation, the files must be removed from the blacklist by
To overcome this limitation, the files must be removed from the ignore list by
Cleaning duplicate assets from the list will cause all the previously uploaded duplicate files to be re-uploaded, the files will not actually be uploaded and will be rejected on the server side (due to duplication) but will be synchronized to the album and at the end will be added to the black list again at the end of the synchronization.
Cleaning duplicate assets from the list will cause all the previously uploaded duplicate files to be re-uploaded, the files will not actually be uploaded and will be rejected on the server side (due to duplication) but will be synchronized to the album and at the end will be added to the ignore list again at the end of the synchronization.
@@ -68,7 +68,7 @@ After bringing down the containers with `docker compose down` and back up with `
:::note
To see exactly what metrics are made available, you can additionally add `8081:8081` to the server container's ports and `8082:8082` to the microservices container's ports.
Visiting the `/metrics` endpoint for these services will show the same raw data that Prometheus collects.
To configure these ports see [`IMMICH_API_METRICS_PORT` & `IMMICH_MICROSERVICES_METRICS_PORT`](../install/environment-variables/#general).
To configure these ports see [`IMMICH_API_METRICS_PORT` & `IMMICH_MICROSERVICES_METRICS_PORT`](/docs/install/environment-variables/#general).
:::
### Usage
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.