---
title: "init(contentsOf:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/imagepresentationcomponent/spatial3dimage/init(contentsof:)"
---

# init(contentsOf:)

Initializes a spatial 3D image from the contents of an image file.

## Declaration

```swift
convenience init(contentsOf url: URL) async throws
```

## Discussion

Discussion note: The newly created spatial 3D image is not yet in a generated state.

## See Also

### Creating a spatial scene from a 2D image or spatial photo

- [init(imageSource:)](realitykit/imagepresentationcomponent/spatial3dimage/init(imagesource:).md)
