---
title: "init(request:scale:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/asyncimage/init(request:scale:)"
---

# init(request:scale:)

Loads and displays an image from the specified URL load request.

## Declaration

```swift
nonisolated init(request: URLRequest, scale: CGFloat = 1) where Content == Image
```

## Parameters

- `request`: The doc://com.apple.documentation/documentation/Foundation/URLRequest of the image to display.
- `scale`: The scale to use for the image. The default is 1. Set a different value when loading images designed for higher resolution displays. For example, set a value of 2 for an image that you would name with the @2x suffix if stored in a file on disk.

## Discussion

Discussion Until the image loads, SwiftUI displays a default placeholder. When the load operation completes successfully, SwiftUI updates the view to show the loaded image. If the operation fails, SwiftUI continues to display the placeholder. The following example loads and displays an icon from an example server: AsyncImage(request: URLRequest(url: imageURL)) If you want to customize the placeholder or apply image-specific modifiers — like resizable(capInsets:resizingMode:) — to the loaded image, use the init(request:scale:content:placeholder:) initializer instead.

## See Also

### Loading an image with a URL request

- [init(request:scale:content:placeholder:)](swiftui/asyncimage/init(request:scale:content:placeholder:).md)
- [init(request:scale:transaction:content:)](swiftui/asyncimage/init(request:scale:transaction:content:).md)
