> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rixxui.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Images, links, and resource policies

> Control navigation and image fetching independently with safe defaults and host narrowing policies.

Rixx UI accepts only syntax-valid, credential-free HTTPS URLs. Host policies can
narrow that baseline but cannot broaden it.

```tsx theme={null}
const allowedLinkHosts = new Set(["docs.example.com"]);
const allowedImageHosts = new Set(["cdn.example.com"]);

<RUIRenderer
  urlPolicy={(value) => allowedLinkHosts.has(new URL(value).hostname)}
  imagePolicy={({ src, origin }) =>
    origin === "component" && allowedImageHosts.has(new URL(src).hostname)
  }
  onNavigate={(event) => openTrustedRoute(event.url)}
  options={{ externalLinkBehavior: "confirm", resourceTiming: "committed" }}
>
  {source}
</RUIRenderer>;
```

## Separate decisions

`urlPolicy` controls link/navigation eligibility. `imagePolicy` controls browser
image requests and receives `src`, `alt`, `title`, `nodeId`, and an `origin` of
`component` or `markdown`. Allowing navigation never allows an image request.

External links use a trusted review dialog by default. Set
`externalLinkBehavior: "direct"` only when direct opening matches the host's
security model. `onNavigate` can replace default opening with host routing.

## Resource timing

| Value         | Behavior                                                  |
| ------------- | --------------------------------------------------------- |
| `progressive` | Load complete, policy-approved images during safe preview |
| `committed`   | Wait for authoritative commit before loading              |
| `manual`      | Require a user gesture before attaching the image URL     |

All image modes use lazy loading, asynchronous decoding, no referrer, responsive
dimensions where available, and a failure placeholder. Progressive requests
cannot be undone, so use `committed` or `manual` for privacy-sensitive hosts.
