---
title: "asyncImageURLSession(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/asyncimageurlsession(_:)"
---

# asyncImageURLSession(_:)

A modifier that adds a URL session for asynchronous images contained in the view to use when fetching image data.

## Declaration

```swift
nonisolated func asyncImageURLSession(_ urlSession: URLSession) -> some View

```

## Parameters

- `urlSession`: An instance of doc://com.apple.documentation/documentation/Foundation/URLSession for doc://com.apple.SwiftUI/documentation/SwiftUI/AsyncImage instances to use for image download data tasks.
