---
title: PHImageManager
framework: photos
role: symbol
role_heading: Class
path: photos/phimagemanager
---

# PHImageManager

An object that facilitates retrieving or generating preview thumbnails and asset data.

## Declaration

```swift
class PHImageManager
```

## Mentioned in

Displaying Live Photos Loading and Caching Assets and Thumbnails

## Overview

Overview Use these methods to fetch full-size photo assets or thumbnail images, or to retrieve AVFoundation objects for playing, exporting, and manipulating video assets. To load image or video data: Use the PHAsset class to fetch the asset you’re interested in. Call the default() method to retrieve the shared image manager object. Use one of the methods listed in the Requesting groups below to load the asset’s image or video data. The image manager caches the asset images and data it provides, so later requests for the same assets with similar parameters will return results more quickly. If you need to load image data for many assets together, use the PHCachingImageManager class to “preheat” the cache by loading images you expect to need soon. For example, when populating a collection view with photo asset thumbnails, you can cache images ahead of the current scroll position.

## Topics

### Getting the Image Manager

- [default()](photos/phimagemanager/default().md)

### Requesting Images

- [requestImage(for:targetSize:contentMode:options:resultHandler:)](photos/phimagemanager/requestimage(for:targetsize:contentmode:options:resulthandler:).md)
- [requestImageDataAndOrientation(for:options:resultHandler:)](photos/phimagemanager/requestimagedataandorientation(for:options:resulthandler:).md)
- [PHImageManagerMaximumSize](photos/phimagemanagermaximumsize.md)

### Requesting Video Objects

- [requestPlayerItem(forVideo:options:resultHandler:)](photos/phimagemanager/requestplayeritem(forvideo:options:resulthandler:).md)
- [requestExportSession(forVideo:options:exportPreset:resultHandler:)](photos/phimagemanager/requestexportsession(forvideo:options:exportpreset:resulthandler:).md)
- [requestAVAsset(forVideo:options:resultHandler:)](photos/phimagemanager/requestavasset(forvideo:options:resulthandler:).md)

### Requesting Live Photos

- [requestLivePhoto(for:targetSize:contentMode:options:resultHandler:)](photos/phimagemanager/requestlivephoto(for:targetsize:contentmode:options:resulthandler:).md)

### Canceling a Request

- [cancelImageRequest(_:)](photos/phimagemanager/cancelimagerequest(_:).md)
- [PHImageRequestID](photos/phimagerequestid.md)
- [PHInvalidImageRequestID](photos/phinvalidimagerequestid.md)

### Constants

- [PHImageContentMode](photos/phimagecontentmode.md)
- [Image Result Info Keys](photokit/image-result-info-keys.md)

## Relationships

### Inherits From

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

### Inherited By

- [PHCachingImageManager](photos/phcachingimagemanager.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)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Asset loading

- [Loading and Caching Assets and Thumbnails](photokit/loading-and-caching-assets-and-thumbnails.md)
- [PHCachingImageManager](photos/phcachingimagemanager.md)
- [PHImageRequestOptions](photos/phimagerequestoptions.md)
- [PHVideoRequestOptions](photos/phvideorequestoptions.md)
- [PHLivePhotoRequestOptions](photos/phlivephotorequestoptions.md)
