Monoize
Transforms

Image: resolve URLs to base64

Download image URLs in requests or responses and inline them as base64 sources.

What it does

This transform downloads request or response image URLs concurrently and replaces them with inline base64 sources. A failed or oversized download leaves that node unchanged.

Without this transform, Monoize never fetches remote image URLs.

Reference

PropertyValue
Type IDimage_resolve_urls
Phaserequest, response
ScopesProvider, API key

When to use

  • The upstream rejects URL image sources and accepts only inline base64 data.
  • Image URLs point to hosts that the upstream cannot reach, for example an internal network.

Configuration

OptionTypeRequiredDefaultDescription
timeout_secondsintegerNo30Per-download timeout in seconds.
max_bytesintegerNo20971520Maximum bytes per downloaded image. Default 20 MiB.
rolesstring[]No—Roles whose image URLs are resolved: user, assistant, system. Empty resolves all.

Example rule

{
  "transform": "image_resolve_urls",
  "enabled": true,
  "phase": "request",
  "models": [
    "*"
  ],
  "config": {
    "timeout_seconds": 30,
    "roles": [
      "user"
    ]
  }
}

Return base64 images to downstream clients

For an Images API client that requires b64_json, apply the transform in the response phase. Monoize downloads the upstream URL and encodes the image as data[].b64_json.

{
  "transform": "image_resolve_urls",
  "enabled": true,
  "phase": "response",
  "models": [
    "gpt-image-2.5-sunburst"
  ],
  "config": {
    "timeout_seconds": 30,
    "max_bytes": 20971520,
    "roles": [
      "assistant"
    ]
  }
}

On this page