{
  "mandatory_fields": {
    "enable_image_optimization": {
      "type": "boolean",
      "default": true,
      "description": "Enable image optimization"
    },
    "enable_lazy_loading": {
      "type": "boolean",
      "default": true,
      "description": "Enable lazy loading for images"
    },
    "lazy_load_threshold": {
      "type": "integer",
      "default": 300,
      "min": 0,
      "max": 1000,
      "description": "Pixels before viewport to start loading"
    },
    "convert_to_webp": {
      "type": "boolean",
      "default": false,
      "description": "Convert images to WebP format"
    },
    "convert_to_avif": {
      "type": "boolean",
      "default": false,
      "description": "Convert images to AVIF format"
    },
    "serve_scaled_images": {
      "type": "boolean",
      "default": true,
      "description": "Serve appropriately sized images"
    },
    "compression_level": {
      "type": "integer",
      "default": 85,
      "min": 0,
      "max": 100,
      "description": "JPEG compression quality"
    },
    "enable_responsive_images": {
      "type": "boolean",
      "default": true,
      "description": "Add srcset for responsive images"
    },
    "exclude_classes": {
      "type": "array",
      "default": ["no-lazy", "skip-lazy"],
      "items": "string",
      "description": "CSS classes to exclude from lazy loading"
    },
    "add_dimensions": {
      "type": "boolean",
      "default": true,
      "description": "Add width/height attributes to prevent CLS"
    },
    "optimize_on_upload": {
      "type": "boolean",
      "default": false,
      "description": "Optimize images on upload"
    },
    "background_mode": {
      "type": "boolean",
      "default": false,
      "description": "Process images in background using Action Scheduler"
    },
    "backup_originals": {
      "type": "boolean",
      "default": true,
      "description": "Keep backup of original images"
    },
    "custom_folders": {
      "type": "array",
      "default": [],
      "items": "string",
      "description": "Additional folders to scan for images"
    },
    "smart_exclusions": {
      "type": "object",
      "default": {
        "enabled": true,
        "min_size": 10,
        "max_size": 5000,
        "exclude_patterns": ["logo", "icon", "favicon", "badge", "banner"]
      },
      "description": "Smart exclusion settings"
    },
    "compression_type": {
      "type": "string",
      "enum": ["lossy", "glossy", "lossless"],
      "default": "glossy",
      "description": "Compression type for optimization"
    },
    "smart_compression": {
      "type": "boolean",
      "default": true,
      "description": "Automatically adjust quality based on image content"
    },
    "pdf_optimization": {
      "type": "boolean",
      "default": false,
      "description": "Optimize PDF files"
    },
    "retina_images": {
      "type": "boolean",
      "default": true,
      "description": "Generate @2x images for retina displays"
    },
    "png_to_jpeg": {
      "type": "boolean",
      "default": false,
      "description": "Convert PNG images to JPEG when beneficial"
    },
    "optimize_original_source": {
      "type": "boolean",
      "default": false,
      "description": "Reduce the bytes served at the original attachment URL in place"
    },
    "cmyk_to_rgb": {
      "type": "boolean",
      "default": true,
      "description": "Convert CMYK images to RGB"
    },
    "exif_removal": {
      "type": "string",
      "enum": ["keep_all", "remove_all", "keep_copyright"],
      "default": "keep_copyright",
      "description": "EXIF data handling"
    },
    "optimization_method": {
      "type": "string",
      "enum": ["local", "prorank"],
      "default": "local",
      "description": "Optimization method to use"
    },
    "api_key": {
      "type": "string",
      "default": "",
      "description": "API key for cloud optimization"
    },
    "max_image_width": {
      "type": "integer",
      "default": 2560,
      "min": 800,
      "max": 4096,
      "description": "Maximum image width in pixels"
    },
    "delivery_method": {
      "type": "string",
      "enum": ["none", "picture", "rewrite", "both"],
      "default": "picture",
      "description": "WebP/AVIF delivery method"
    },
    "exclude_sizes": {
      "type": "array",
      "default": [],
      "items": "string",
      "description": "Image sizes to exclude from optimization"
    }
  }
}
