WebMCP Registry

image_compress

verifiedv0.1

Compress one JPEG, PNG or WebP image in the browser. Pass image { mime, base64 } (max 12 MiB decoded). mode is quality, target-size, or email; quality 1–100; targetKB 5–10240; output original|jpeg|webp|avif; allowDownscale; emailProvider gmail|outlook. HEIC is not supported here — use image_convert first. Variant URLs are not a second machine Tool — pass mode and targetKB explicitly. Do not upload.

Updated 9/3/2026 · Created 9/3/2026

Input Schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "image"
  ],
  "properties": {
    "mode": {
      "enum": [
        "quality",
        "target-size",
        "email"
      ],
      "type": "string",
      "default": "quality"
    },
    "image": {
      "type": "object",
      "required": [
        "mime",
        "base64"
      ],
      "properties": {
        "mime": {
          "enum": [
            "image/jpeg",
            "image/png",
            "image/webp",
            "image/avif",
            "image/heic",
            "image/heif",
            "image/jxl"
          ],
          "type": "string"
        },
        "base64": {
          "type": "string",
          "maxLength": 16777220,
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "output": {
      "enum": [
        "original",
        "jpeg",
        "webp",
        "avif"
      ],
      "type": "string",
      "default": "original"
    },
    "quality": {
      "type": "integer",
      "default": 80,
      "maximum": 100,
      "minimum": 1
    },
    "targetKB": {
      "type": "integer",
      "default": 100,
      "maximum": 10240,
      "minimum": 5
    },
    "emailProvider": {
      "enum": [
        "gmail",
        "outlook"
      ],
      "type": "string",
      "default": "gmail"
    },
    "allowDownscale": {
      "type": "boolean",
      "default": false
    }
  },
  "additionalProperties": false
}

Full Contract

{
  "name": "image_compress",
  "description": "Compress one JPEG, PNG or WebP image in the browser. Pass image { mime, base64 } (max 12 MiB decoded). mode is quality, target-size, or email; quality 1–100; targetKB 5–10240; output original|jpeg|webp|avif; allowDownscale; emailProvider gmail|outlook. HEIC is not supported here — use image_convert first. Variant URLs are not a second machine Tool — pass mode and targetKB explicitly. Do not upload.",
  "inputSchema": {
    "type": "object",
    "$schema": "http://json-schema.org/draft-07/schema#",
    "required": [
      "image"
    ],
    "properties": {
      "mode": {
        "enum": [
          "quality",
          "target-size",
          "email"
        ],
        "type": "string",
        "default": "quality"
      },
      "image": {
        "type": "object",
        "required": [
          "mime",
          "base64"
        ],
        "properties": {
          "mime": {
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "image/avif",
              "image/heic",
              "image/heif",
              "image/jxl"
            ],
            "type": "string"
          },
          "base64": {
            "type": "string",
            "maxLength": 16777220,
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "output": {
        "enum": [
          "original",
          "jpeg",
          "webp",
          "avif"
        ],
        "type": "string",
        "default": "original"
      },
      "quality": {
        "type": "integer",
        "default": 80,
        "maximum": 100,
        "minimum": 1
      },
      "targetKB": {
        "type": "integer",
        "default": 100,
        "maximum": 10240,
        "minimum": 5
      },
      "emailProvider": {
        "enum": [
          "gmail",
          "outlook"
        ],
        "type": "string",
        "default": "gmail"
      },
      "allowDownscale": {
        "type": "boolean",
        "default": false
      }
    },
    "additionalProperties": false
  }
}

GET /api/tool/simpletoolstack.com/image_compress