Plugin that defines custom metadata fields in the Lightroom catalog and allows exporting/importing them as XMP.
- JPG / TIFF → XMP embedded inside the file
- RAW (NEF, CR2, ARW, …) → sidecar
.xmpfile next to the original
| Component | Version |
|---|---|
| Adobe Lightroom Classic | 13+ |
| ExifTool (Phil Harvey) | 12.0+ |
ExifTool: https://exiftool.org — must be available in PATH.
- Copy the
CustomMetadataPlugin.lrpluginfolder to any location. - In Lightroom: File → Plug-in Manager → Add → point to the folder.
- Click Done.
CustomMetadataPlugin.lrplugin/
│
│ ┌──────────────────────── EDIT THESE FILES ─────────────────────────┐
│ │ │
├── FieldDefinitions.lua ← Field definitions (add/remove fields here)
├── PluginConfig.lua ← Settings (logging, namespace, RAW ext.)
│ │ │
│ └────────────────────────────────────────────────────────────────────┘
│
├── Info.lua Plugin descriptor
├── PluginLogger.lua Logging module
├── SharedConfig.lua ExifTool config generator + utilities
├── CustomMetadataDefinition.lua Auto-generated metadata provider
├── CustomMetadataTagset.lua Auto-generated tagset
├── CustomExportFilter.lua Export filter
├── WriteMetadataToXMP.lua Menu: write to XMP
├── ReadMetadataFromXMP.lua Menu: read from XMP
└── README.md
Edit only FieldDefinitions.lua:
{
id = "myNewField", -- unique ID (a-zA-Z)
xmpTag = "MyNewField", -- XMP tag name (PascalCase)
title = "My New Field", -- display name
dataType = "string", -- "string" or "enum"
searchable = true, -- filtering in Smart Collections
browsable = true, -- filtering in Library
section = "My Section", -- group in the Metadata panel
},For an enum field, add values:
{
id = "priority",
xmpTag = "Priority",
title = "Priority",
dataType = "enum",
values = {
{ value = "high", title = "High" },
{ value = "medium", title = "Medium" },
{ value = "low", title = "Low" },
},
searchable = true,
browsable = true,
section = "Organization",
},After editing: Plug-in Manager → Disable → Enable.
Edit PluginConfig.lua:
-- "off" — disabled (production)
-- "error" — critical errors only
-- "warn" — errors + warnings
-- "trace" — full diagnostics (ExifTool commands, paths, etc.)
PluginConfig.LOG_LEVEL = "off"Logs are saved in: ~/Documents/LrClassicLogs/
- Library module → Metadata panel → tagset "Custom Metadata".
- Fill in the fields.
- Select photos.
- Library → Plug-in Extras → Write Custom Metadata to XMP.
- Export (Ctrl+Shift+E).
- Section "Custom XMP Metadata" → check the checkbox.
- Metadata will be embedded in the exported file.
- Select photos with embedded/sidecar metadata.
- Library → Plug-in Extras → Read Custom Metadata from XMP.
URI: http://ns.photocoder.pl/metadata/1.0/
Prefix: custmeta
Verification:
exiftool -config custom_xmp.config -XMP-custmeta:all photo.jpgMIT