CROP
ProjectsParts ServicesMedia

Image Metadata Architecture

Embed product metadata directly into images (XMP) so it's never lost, even when images are shared or found via Google.

Image Metadata Architecture

Overview

Embed product metadata directly into images (XMP) so it's never lost, even when images are shared or found via Google.

Metadata Schema

{
  "schemaVersion": "1.0",
  "createdAt": "2025-11-25T10:00:00Z",
  "updatedAt": "2025-11-25T10:00:00Z",

  "company": {
    "name": "Clinton Tractor & Implement Co.",
    "type": "Authorized Reseller",
    "website": "https://clintontractor.com"
  },

  "legal": {
    "copyright": "© 2025 Clinton Tractor & Implement Co. All rights reserved.",
    "license": "Licensed for Clinton Tractor e-commerce use only."
  },

  "product": {
    "sku": "CT-NHL-00907566",
    "partNumber": "00907566",
    "pnNorm": "907566",
    "title": "Hydraulic Filter Element",
    "manufacturer": {
      "name": "New Holland",
      "code": "NHL"
    },
    "categoryName": ["Filters", "Hydraulic Filters"],
    "categoryPath": ["Parts - Filters - Hydraulic Filters"],
    "equipmentFitment": ["T7.270", "T7.290"],
    "status": "active"
  },

  "image": {
    "type": "marketing",
    "sortOrder": 1,
    "source": "vendor_scraped",
    "alt": "Hydraulic Filter Element"
  },

  "catalog": {
    "url": "https://clintontractor.com/parts/ct-nhl-00907566",
    "slug": "hydraulic-filter-element-00907566"
  },

  "embedding": {
    "embedded": true,
    "embeddedAt": "2025-11-25T10:30:00Z",
    "version": "2025.11.25",
    "processor": "local-worker-01"
  }
}

SKU System

Format: CT-VENDOR-PARTNUMBER

ComponentSourceExample
CTConstant prefixCT
VENDORmanufacturer.codeNHL, BNS, GRP
PARTNUMBERpartNumber00907566

Result: CT-NHL-00907566

Storage Architecture

WhatWherePurpose
JSON sidecarGCS next to imageSource of truth
XMP metadataInside image fileInseparable from image
CopyMongoDBFast queries
CopyElasticsearchFull-text search

Hybrid Processing System

MODE: HYBRID (Local primary, Cloud fallback)

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│ Task Queue  │────►│   Router    │────►│   Worker    │
│             │     │             │     │ Local/Cloud │
└─────────────┘     └─────────────┘     └─────────────┘

                    ┌──────┴──────┐
                    ▼             ▼
              [LOCAL]        [CLOUD]
              Primary        Fallback
              FREE           $0.12/GB

Cost Summary

Processing 5M images:

ProcessingCost
Cloud Only~$590
Local (recommended)~$50-100
Savings$490+

File Structure in GCS

gs://crop_parts/nhl/gallery/00907566/
├── 00907566-1.jpg           ← Image with XMP embedded
├── 00907566-1.meta.json     ← Source of truth
├── 00907566-2.jpg
└── 00907566-2.meta.json

Field Naming Convention

All fields use camelCase (consistent with IndexedPart):

FieldStyleExample
partNumbercamelCase00907566
pnNormcamelCase907566
equipmentFitmentcamelCaseT7.270
categoryNamecamelCaseFilters
categoryPathcamelCaseParts - Filters

Key Fields for AI Recognition

FieldValuePurpose
company.nameClinton Tractor & Implement Co.Brand identification
product.skuCT-NHL-00907566Unique Clinton Tractor SKU
product.partNumber00907566OEM part number
legal.copyright© 2025 Clinton Tractor...Legal protection
catalog.urlclintontractor.com/...Direct product link

On this page