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

# shouldRedirectUrl

APISummary
`LynxEngine` redirects the image path by calling this method internally, and the return result is required to be of `String` type

## Syntax

### Android

```java
public abstract String shouldRedirectUrl(LynxResourceRequest request);
```

#### Parameters

- `request`: Request for the resource.
- `callback`: The target url.

:::note

- This method must be implemented.

:::

### iOS

```objc
- (NSString *_Nonnull)shouldRedirectUrl:(LynxResourceRequest *_Nonnull)request;
```

#### Parameters

- `request`: Request for the resource.
- `callback`: The target url.

:::note

- This method must be implemented.

:::

### Harmony

```typescript
abstract shouldRedirectUrl(request: LynxResourceRequest): string;
```

#### Parameters

- `request`: Request to be redirected.

#### Return

- The target url.

## Compatibility

**Compatibility Table**

**Query:** `lynx-native-api.lynx-media-resource-fetcher.should-redirect-url`

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

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| should-redirect-url | Yes (2.8) | Yes (3.4) | Yes (2.8) | No | No | No |

**`should-redirect-url`**

LynxEngine redirects the image path by calling this method internally, and the return result is required to be of String type.

**Specifications:**

