Skip to content

High performance self-hosted photo and video management solution.

18.2 KB
Raw Blame
{
  "name": "immich-plugin-core",
  "version": "2.0.1",
  "title": "Immich Core Plugin",
  "description": "Core workflow capabilities for Immich",
  "author": "Immich Team",
  "wasmPath": "dist/plugin.wasm",
  "templates": [
    {
      "name": "screenshots-smart-album",
      "title": "Archive screenshots",
      "description": "Archive uploads with \"screenshot\" in the filename and optionally add them to an album",
      "trigger": "AssetCreate",
      "steps": [
        {
          "method": "immich-plugin-core#assetFileFilter",
          "config": {
            "pattern": "screenshot",
            "matchType": "contains",
            "caseSensitive": false
          }
        },
        {
          "method": "immich-plugin-core#assetArchive",
          "config": {
            "inverse": false
          }
        },
        {
          "method": "immich-plugin-core#assetAddToAlbums",
          "config": {
            "albumName": "Screenshots",
            "albumIds": []
          }
        }
      ],
      "uiHints": ["SmartAlbum"]
    },
    {
      "name": "missing-timezone-smart-album",
      "title": "Missing timezone",
      "description": "Automatically create an album for assets without a time zone",
      "trigger": "AssetMetadataExtraction",
      "steps": [
        {
          "method": "immich-plugin-core#assetMissingTimeZoneFilter",
          "config": {}
        },
        {
          "method": "immich-plugin-core#assetAddToAlbums",
          "config": {
            "albumName": "Missing time zone",
            "albumIds": []
          }
        }
      ],
      "uiHints": ["SmartAlbum"]
    },
    {
      "name": "location-smart-album",
      "title": "Location-based album",
      "description": "Automatically add assets taken in a specific location to an album",
      "trigger": "AssetMetadataExtraction",
      "steps": [
        {
          "method": "immich-plugin-core#assetLocationFilter",
          "config": { "region": { "city": "Vancouver", "state": "British Columbia", "country": "Canada" } }
        },
        {
          "method": "immich-plugin-core#assetAddToAlbums",
          "config": {
            "albumName": "Vancouver photos & videos",
            "albumIds": []
          }
        }
      ],
      "uiHints": ["SmartAlbum"]
    },
    {
      "name": "receipts",
      "title": "Receipts",
      "description": "Automatically add receipt assets to an album",
      "trigger": "AssetOcrExtraction",
      "steps": [
        {
          "method": "immich-plugin-core#assetOcrFilter",
          "config": {
            "caseSensitive": false,
            "pattern": "receipt.+total",
            "matchType": "regex",
            "matchScope": "full",
            "minScore": 0
          }
        },
        {
          "method": "immich-plugin-core#assetAddToAlbums",
          "config": {
            "albumName": "Receipts",
            "albumIds": []
          }
        }
      ],
      "uiHints": ["SmartAlbum"]
    }
  ],
  "methods": [
    {
      "name": "assetFileFilter",
      "title": "Filter by filename",
      "description": "Filter assets by filename pattern using text matching or regular expressions",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string",
            "title": "Filename pattern",
            "description": "Text or regex pattern to match against filename"
          },
          "matchType": {
            "type": "string",
            "title": "Match type",
            "enum": ["contains", "startsWith", "exact", "regex"],
            "default": "contains",
            "description": "Type of pattern matching to perform"
          },
          "caseSensitive": {
            "type": "boolean",
            "default": false,
            "title": "Case sensitive",
            "description": "Whether matching should be case-sensitive"
          },
          "usePath": {
            "type": "boolean",
            "default": false,
            "title": "Use path",
            "description": "Match the full path on the server instead of the original filename"
          }
        },
        "required": ["pattern"]
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetMissingTimeZoneFilter",
      "title": "Filter by missing time zone",
      "description": "Filter assets that have no time zone information",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "inverse": {
            "type": "boolean",
            "title": "Inverse",
            "description": "Missing by default, set to true to filter assets with a time zone",
            "default": false
          }
        }
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetLocationFilter",
      "title": "Filter assets by geolocation",
      "description": "Filter assets by where they were taken",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "region": {
            "type": "object",
            "title": "Region",
            "description": "Filter by region name",
            "properties": {
              "country": {
                "type": "string",
                "title": "Country",
                "description": "Exact name of the country the asset must be taken in"
              },
              "state": {
                "type": "string",
                "title": "State/province",
                "description": "Exact name of the state/province the asset must be taken in"
              },
              "city": {
                "type": "string",
                "title": "City",
                "description": "Exact name of the city the asset must be taken in"
              }
            }
          },
          "coordinate": {
            "type": "object",
            "title": "Coordinate",
            "description": "Filter by distance to a coordinate",
            "properties": {
              "latitude": {
                "type": "number",
                "title": "Latitude",
                "description": "GPS latitude of a coordinate which the asset must be close to",
                "minimum": -90,
                "maximum": 90,
                "precision": 0.000001
              },
              "longitude": {
                "type": "number",
                "title": "Longitude",
                "description": "GPS longitude of a coordinate which the asset must be close to",
                "minimum": -180,
                "maximum": 180,
                "precision": 0.000001
              },
              "radius": {
                "type": "number",
                "title": "Maximum distance",
                "description": "How close in kilometres the asset must be to the given point",
                "minimum": 0
              }
            }
          }
        }
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetDateFilter",
      "title": "Filter by date",
      "description": "Filter assets by date taken",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "object",
            "title": "Start date",
            "description": "Earliest date of assets to include",
            "properties": {
              "day": {
                "type": "number",
                "title": "Day",
                "description": "Day of the year to match",
                "uiHint": {
                  "order": 1
                }
              },
              "month": {
                "type": "number",
                "title": "Month",
                "description": "Month of the year to match",
                "uiHint": {
                  "order": 2
                }
              },
              "year": {
                "type": "number",
                "title": "Year",
                "description": "Year to match",
                "uiHint": {
                  "order": 3
                }
              }
            },
            "uiHint": {
              "order": 1
            },
            "required": ["day", "month", "year"]
          },
          "endDate": {
            "type": "object",
            "title": "End date",
            "description": "Latest date of assets to include",
            "properties": {
              "day": {
                "type": "number",
                "title": "Day",
                "description": "Day of the year to match",
                "uiHint": {
                  "order": 1
                }
              },
              "month": {
                "type": "number",
                "title": "Month",
                "description": "Month of the year to match",
                "uiHint": {
                  "order": 2
                }
              },
              "year": {
                "type": "number",
                "title": "Year",
                "description": "Year to match",
                "uiHint": {
                  "order": 3
                }
              }
            },
            "uiHint": {
              "order": 2
            },
            "required": ["day", "month", "year"]
          },
          "recurring": {
            "type": "boolean",
            "default": false,
            "title": "Match recurring dates",
            "description": "Allow any assets with matching months/days regardless of the year",
            "uiHint": {
              "order": 3
            }
          }
        },
        "required": ["recurring", "startDate", "endDate"]
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetTypeFilter",
      "title": "Filter by asset type",
      "description": "Filter assets by type",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "allowedTypes": {
            "title": "Asset types",
            "description": "Allowed asset types",
            "type": "string",
            "array": true,
            "enum": ["IMAGE", "VIDEO", "AUDIO", "OTHER"]
          }
        },
        "required": ["allowedTypes"]
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetAddTags",
      "title": "Add Tags",
      "description": "Add tags to an asset",
      "types": ["AssetV1"],
      "hostFunctions": true,
      "schema": {
        "type": "object",
        "properties": {
          "tags": {
            "title": "Tags",
            "description": "Tags to add to the asset",
            "type": "string",
            "array": true,
            "uiHint": {
              "type": "TagId"
            }
          }
        },
        "required": ["tags"]
      }
    },
    {
      "name": "assetTagFilter",
      "title": "Filter by tags",
      "description": "Filter assets by which tags they have",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "tags": {
            "title": "Tags",
            "description": "Which tags the asset must have",
            "type": "string",
            "array": true,
            "uiHint": {
              "type": "TagId"
            }
          },
          "matching": {
            "title": "Matching",
            "description": "Whether assets must have all, any, or none of the listed tags",
            "type": "string",
            "enum": ["all", "any", "none"]
          }
        },
        "required": ["tags", "matching"]
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetExifFilter",
      "title": "Filter by EXIF metadata",
      "description": "Filter assets by their EXIF properties",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "property": {
            "title": "Property",
            "description": "EXIF property to match",
            "type": "string",
            "enum": [
              "make",
              "model",
              "exifImageWidth",
              "exifImageHeight",
              "fileSizeInByte",
              "orientation",
              "lensModel",
              "fNumber",
              "focalLength",
              "iso",
              "description",
              "fps",
              "exposureTime",
              "livePhotoCID",
              "timeZone",
              "projectionType",
              "profileDescription",
              "colorspace",
              "bitsPerSample",
              "rating"
            ],
            "uiHint": {
              "order": 1
            }
          },
          "pattern": {
            "type": "string",
            "title": "Pattern",
            "description": "Text or regex pattern to match against property value",
            "uiHint": {
              "order": 2
            }
          },
          "matchType": {
            "type": "string",
            "title": "Match type",
            "enum": ["contains", "startsWith", "exact", "regex", "present", "missing"],
            "default": "contains",
            "description": "Type of pattern matching to perform",
            "uiHint": {
              "order": 3
            }
          },
          "caseSensitive": {
            "type": "boolean",
            "default": false,
            "title": "Case sensitive",
            "description": "Whether matching should be case-sensitive",
            "uiHint": {
              "order": 4
            }
          }
        },
        "required": ["property"]
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetOcrFilter",
      "title": "Filter by OCR text",
      "description": "Filter assets by OCR text pattern using text matching or regular expressions",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string",
            "title": "OCR text pattern",
            "description": "Text or regex pattern to match against OCR text"
          },
          "matchType": {
            "type": "string",
            "enum": ["contains", "startsWith", "exact", "regex"],
            "default": "contains",
            "title": "Match type",
            "description": "Type of pattern matching to perform"
          },
          "caseSensitive": {
            "type": "boolean",
            "default": false,
            "title": "Case sensitive",
            "description": "Whether matching should be case-sensitive"
          },
          "minScore": {
            "type": "number",
            "default": 0,
            "title": "Minimum score",
            "description": "Minimum OCR confidence score to match"
          },
          "matchScope": {
            "type": "string",
            "enum": ["full", "box"],
            "default": "full",
            "title": "Match scope",
            "description": "Scope of the OCR text to match against"
          }
        },
        "required": ["pattern"]
      },
      "uiHints": ["Filter"]
    },
    {
      "name": "assetArchive",
      "title": "Archive asset",
      "description": "Change asset visibility to archive",
      "types": ["AssetV1"],
      "schema": {
        "properties": {
          "inverse": {
            "title": "Inverse",
            "description": "When true will unarchive any archived assets",
            "type": "boolean"
          }
        }
      }
    },
    {
      "name": "assetLock",
      "title": "Move to locked folder",
      "description": "Change visibility to locked",
      "types": ["AssetV1"],
      "schema": {
        "properties": {
          "inverse": {
            "title": "Inverse",
            "description": "When true will unarchive any archived assets",
            "type": "boolean"
          }
        }
      }
    },
    {
      "name": "assetVisibility",
      "title": "Update visibility",
      "description": "Change visibility to selected option",
      "types": ["AssetV1"],
      "schema": {
        "properties": {
          "visibility": {
            "title": "Visibility",
            "description": "Asset visibility",
            "type": "string",
            "enum": ["archive", "timeline", "locked"]
          }
        },
        "required": ["visibility"]
      }
    },
    {
      "name": "assetFavorite",
      "title": "Favorite",
      "description": "Favorite an asset",
      "types": ["AssetV1"],
      "schema": {
        "type": "object",
        "properties": {
          "inverse": {
            "type": "boolean",
            "title": "Inverse",
            "description": "Favorite by default, set to true to unfavorite instead",
            "default": false
          }
        }
      }
    },
    {
      "name": "assetAddToAlbums",
      "title": "Add to Album(s)",
      "description": "Add asset to selected albums",
      "types": ["AssetV1"],
      "hostFunctions": true,
      "schema": {
        "type": "object",
        "properties": {
          "albumIds": {
            "type": "string",
            "title": "Album IDs",
            "array": true,
            "description": "Target album IDs",
            "uiHint": {
              "type": "AlbumId"
            }
          },
          "albumName": {
            "type": "string",
            "title": "Album name",
            "description": "Use an album with this name if one exists, otherwise create a new one"
          }
        },
        "required": ["albumIds"]
      }
    },
    {
      "name": "webhook",
      "title": "Trigger Webhook",
      "description": "POST/PUT event data to any URL",
      "types": ["AssetV1"],
      "hostFunctions": true,
      "allowedHosts": ["*"],
      "schema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "title": "URL",
            "description": "Event data will be PUT/POSTed to this URL as a JSON object"
          },
          "headerName": {
            "type": "string",
            "title": "Header name",
            "description": "The name of an additional header to include with the request (e.g. authentication)"
          },
          "headerValue": {
            "type": "string",
            "title": "Header value",
            "description": "The value of the additional header"
          },
          "method": {
            "type": "string",
            "title": "Method",
            "description": "The HTTP method to use in the request",
            "enum": ["POST", "PUT"]
          }
        },
        "required": ["url"]
      }
    }
  ]
}