---
title: "creationRequestForAsset(from:)"
framework: photos
role: symbol
role_heading: Type Method
path: "photos/phassetchangerequest/creationrequestforasset(from:)"
---

# creationRequestForAsset(from:)

Creates a request for adding a new image asset to the Photos library.

## Declaration

```swift
class func creationRequestForAsset(from image: UIImage) -> Self
```

```swift
class func creationRequestForAsset(from image: NSImage) -> Self
```

## Parameters

- `image`: An image.

## Mentioned in

Requesting Changes to the Photo Library

## Return Value

Return Value An asset creation request.

## Discussion

Discussion Call this method within a photo library change block to create a new asset. For details on change blocks, see PHPhotoLibrary. To reference the newly created asset later in the same change block or after the change block completes, use the placeholderForCreatedAsset property to retrieve a placeholder object. important: A UIImage object does not contain all metadata associated with the image file it was originally loaded from (for example, Exif tags such as geographic location, camera model, and exposure parameters). To ensure such metadata is saved in the Photos library, instead use the creationRequestForAssetFromImage(atFileURL:) method or the PHAssetCreationRequest class. To copy metadata from one file to another, see Image I/O.

## See Also

### Adding New Assets

- [creationRequestForAssetFromImage(atFileURL:)](photos/phassetchangerequest/creationrequestforassetfromimage(atfileurl:).md)
- [creationRequestForAssetFromVideo(atFileURL:)](photos/phassetchangerequest/creationrequestforassetfromvideo(atfileurl:).md)
- [placeholderForCreatedAsset](photos/phassetchangerequest/placeholderforcreatedasset.md)
