---
title: PHAssetResource
framework: photos
role: symbol
role_heading: Class
path: photos/phassetresource
---

# PHAssetResource

An underlying data resource associated with a photo, video, or Live Photo asset in the Photos library.

## Declaration

```swift
class PHAssetResource
```

## Mentioned in

Uploading asset resources in the background

## Overview

Overview Each PHAsset object references one or more resources. Use these objects to work with those resources directly, like when backing up or restoring assets. A photo asset can contain both JPEG and RAW files representing the same photo. A Live Photo asset contains both still photo and video resources. An edited asset contains resources representing asset content before and after the edit, as well as a resource corresponding to the PHAdjustmentData object that describes the edit. To work with the data contained in an asset resource, fetch it using the PHAssetResourceManager class.

## Topics

### Retrieving an Asset’s Data Resources

- [assetResources(for:)](photos/phassetresource/assetresources(for:)-27o4l.md)
- [assetResources(for:)](photos/phassetresource/assetresources(for:)-2fedw.md)

### Inspecting an Asset Resource

- [type](photos/phassetresource/type.md)
- [PHAssetResourceType](photos/phassetresourcetype.md)
- [contentType](photos/phassetresource/contenttype.md)
- [assetLocalIdentifier](photos/phassetresource/assetlocalidentifier.md)
- [uniformTypeIdentifier](photos/phassetresource/uniformtypeidentifier.md)
- [originalFilename](photos/phassetresource/originalfilename.md)
- [pixelHeight](photos/phassetresource/pixelheight.md)
- [pixelWidth](photos/phassetresource/pixelwidth.md)

### Instance Properties

- [dataSize](photos/phassetresource/datasize-5lxva.md)

### Type Methods

- [assetResource(forUploadJob:)](photos/phassetresource/assetresource(foruploadjob:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Asset resource management

- [PHAssetCreationRequest](photos/phassetcreationrequest.md)
- [PHAssetResourceCreationOptions](photos/phassetresourcecreationoptions.md)
- [PHAssetResourceManager](photos/phassetresourcemanager.md)
- [PHAssetResourceRequestOptions](photos/phassetresourcerequestoptions.md)
