<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/asyncImageURLSession(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE20asyncImageURLSessionyQrSo12NSURLSessionCF"
  },
  "title" : "asyncImageURLSession(_:)"
}
-->

# asyncImageURLSession(_:)

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

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

## Parameters

`urlSession`

An instance of <doc://com.apple.documentation/documentation/Foundation/URLSession> for [`AsyncImage`](/documentation/SwiftUI/AsyncImage) instances to use for image download data tasks.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)