{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Schema for imageoptimizer.json files",
  "id": "https://json.schemastore.org/imageoptimizer.json",
  "properties": {
    "optimizations": {
      "description": "An array of optimization rules",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["includes"],
        "properties": {
          "includes": {
            "description": "An array of globbing patterns of files/folders to include in the optimization",
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "excludes": {
            "description": "An array of globbing patterns of files/folders to exclude in the optimization",
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": ["node_modules", "bower_components", "jspm_packages"]
          },
          "lossy": {
            "description": "When set to true, images are compressed a lot more but with a slight quality loss that may not be visible to the human eye.",
            "type": "boolean",
            "default": false
          }
        }
      }
    }
  },
  "type": "object"
}