> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# fetchImage

APISummary
`LynxEngine` 会调用此方法来获取图片的位图信息，返回内容必须是 `Closeable` 类型。

## 语法

### Android

```java
public void fetchImage(LynxResourceRequest request, LynxResourceCallback<Closeable> callback);
```

#### 参数说明

- `request`: 资源请求。
- `callback`: 包含所需 `drawable` 的响应。

:::note

- 此方法为可选实现。

:::

### iOS

```objc
- (dispatch_block_t)fetchUIImage:(LynxResourceRequest *_Nonnull)request
                      onComplete:(LynxMediaResourceCompletionBlock _Nonnull)response;
```

#### 参数说明

- `request`: 资源请求。
- `response`: 包含所需 `drawable` 的响应。

:::note

- 此方法为可选实现。

:::

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.lynx-media-resource-fetcher.fetch-image`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-media-resource-fetcher/fetch-image.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| fetch-image | Yes (2.8) | Yes (3.4) | Yes (2.8) | No | No | No |

**`fetch-image`**

LynxEngine will use this method to obtain the bitmap information of the image, and the return content must be of Closeable type.

**Specifications:**

