Add asset plugin type and first-party Immich plugin - #948
Open
slothful-vassal wants to merge 20 commits into
Open
Add asset plugin type and first-party Immich plugin#948slothful-vassal wants to merge 20 commits into
slothful-vassal wants to merge 20 commits into
Conversation
slothful-vassal
marked this pull request as ready for review
May 10, 2026 18:13
slothful-vassal
marked this pull request as draft
May 30, 2026 15:23
slothful-vassal
commented
May 30, 2026
slothful-vassal
left a comment
Contributor
Author
There was a problem hiding this comment.
back to draft: try to implement as plugin
slothful-vassal
force-pushed
the
immichIntegration
branch
from
July 2, 2026 20:24
716fc66 to
2dfe8c5
Compare
slothful-vassal
force-pushed
the
immichIntegration
branch
from
July 3, 2026 21:35
76c7d93 to
8824022
Compare
… immichIntegration # Conflicts: # web/src/lib/components/summit_log/summit_log_modal.svelte # web/src/lib/i18n/locales/no.json # web/src/lib/models/trail.ts # web/src/lib/stores/summit_log_store.ts # web/src/lib/stores/trail_store.ts # web/src/routes/trail/edit/[id]/+page.svelte # web/src/routes/trail/edit/[id]/+page.ts
slothful-vassal
marked this pull request as ready for review
July 9, 2026 17:07
# Conflicts: # db/plugins/importer/importer.go # db/plugins/importer/importer_test.go # db/util/network_test.go # db/util/safe_fetch.go # web/src/lib/components/profile/feed_card.svelte
# Conflicts: # web/src/lib/components/trail/trail_info_panel.svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces asset plugins, a new plugin category that connects wanderer to external media libraries, and ships Immich as the first integration: Immich suggests geotagged photos that match a trail or waypoint, and wanderer imports or links them as photo assets. This implements the feature requested in several issues (#160, #395). The plugin type is generic, so other libraries (e.g. PhotoPrism, #530) can follow without further core changes.
Data model & migration
assetscollection plus link collections for trails, waypoints, and summit logs, with access rules, APIs, and hooks.photosfields are removed from the trails, waypoints, and summit_logs collections — assets are now the single source of truth.photosarray, now computed from asset links, and federation/full-sync converts legacyphotosfile URLs from older instances into assets.Plugin system
type: "assets"with anasset_library.v1capability; installed plugins are now categorized astrailsorassets.photoMode): photos are either copied into wanderer (copy), or kept in the source library and referenced (link_private). Linked photos are materialized (copied in) before their target becomes public, and a guard prevents disabling a plugin while linked photos still depend on it.link_privateonly saves storage for trails that stay private. The settings UI states this so the tradeoff isn't surprising.Immich plugin
copy.UI
Existing flows
exif-jsvendor copy withExifReader. This is required here: photo matching needs HEIC/HEIF metadata, which must be read beforeheic2anystrips it during conversion. It also leaves wanderer with a single maintained EXIF reader instead of two stacks.Reviewer guide
The diff is large (~200 files), but much of it is mechanical — existing photo code paths updated to read and write through the new asset links. Suggested entry points, in reading order:
db/migrations/1778359896_created_assets.go— theassetscollection, link collections, and legacy photo migration.db/pluginsystem/manifest.goandplugins/schema/plugin.schema.json— theassetsplugin type andasset_library.v1capability.db/routes/assets.goanddb/routes/plugin_system_assets.go— asset APIs and the host-side search/import/materialize/repair/delete flows.plugins/immich/— the plugin itself (API client inimmich.go, time/location matching inmatching.go).web/src/lib/components/photo/photo_picker.svelte— the central UI entry point for external photo selection.Upgrade / review notes
photosfields from those collections. The down migration intentionally does not undo this; upgrade with a full backup.installed_plugins.typeis updated so installed plugins are categorized astrailsorassets.user.read,asset.read,asset.view, andasset.download. No write, delete, upload, album, library, or admin scopes are required.link_privatemode, photos stay backed by the source library only while the target remains non-public; publishing or federating a trail materializes (copies) its linked photos so public views can serve them safely. As a result,link_privatereduces storage only for permanently-private trails.Screenshots
(UI shown in German)
New Assets plugin category on the plugin settings page:
Immich plugin settings — storage mode, import size, auto-attach, and matching limits:
New data maintenance pages — duplicates, photo metadata backfill, trails without photos, and orphaned photos:
Photos as a source everywhere — waypoints can be created from photos, and photo pickers offer the media library next to local files:
The "waypoints from photos" dialog with source filter, time range, map preview, and photo preview:
Validation
Automated coverage was added or updated for asset migrations/share rules, asset helpers, federated asset identity, plugin manifests, asset plugin routes, asset merge, remote list/trail serialization, importer auto-attach, category preference filtering, and Immich matching.
Manual checks completed:
assetscollection, asset plugin type, and existing trail plugins.user.read,asset.read,asset.view, andasset.download.Manual checks still pending — should be completed before merging:
link_privateaccess control for private trails, shared private trails, and publish transitions.