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

# Image

## Image

显示图片，支持在线 URL、Blob URL 和 data URL。

## 签名

```xml theme={null}
<Image Src="{Data.Cover.Url}" Alt="封面" W="160" H="90" Rounded="True" />
<Image>https://example.com/a.png</Image>
```

## 属性

| 属性 | 类型 | 说明 |
| :- | :- | :- |
| `Src` | URL | 必填；https / Blob / data URL |
| `Alt` | string | 替代文本 |
| `W` / `H` | 1–2048 | 像素宽高 |
| `Rounded` | `True` / `False` | 圆角 |

## 运行时行为

* 静态 https 图片可来自任意 HTTPS 域名。
* 动态 `Src` 需要匹配 `Widget.ImageHosts`；可用 `*` 或 `*.cdn.com` 一次确认。
* Blob URL（来自 `Data Type="Binary"` 或 `Resources Binary`）直接渲染。
* 不写 `W` 时宽度 100%；不写 `H` 时高度自动。
* 使用 `object-cover` 裁剪。

## 示例

```xml theme={null}
<Image Src="{Data.Avatar}" W="48" H="48" Rounded="True" Alt="头像" />

<Data Name="Cover" Type="Binary" Source="File" Path="./cover.png" />
<Image Src="{Data.Cover.Url}" W="320" H="180" Rounded="True" />
```

## 坑

* 远程图片加载失败不会显示占位；需要占位时用 `If` 判断数据状态。
* 动态图片未匹配 `ImageHosts` 时不会渲染；对方仍可看到请求 IP，敏感场景请使用可信图床或 Blob。
* 大图会占用内存；尽量限制 `W/H`。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.