<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHImageManager/cancelImageRequest(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHImageManager(im)cancelImageRequest:"
  },
  "title" : "cancelImageRequest(_:)"
}
-->

# cancelImageRequest(_:)

Cancels an asynchronous request

```
func cancelImageRequest(_ requestID: PHImageRequestID)
```

## Parameters

`requestID`

The numeric identifier of the request to be canceled.

## Discussion

When you perform an asynchronous request for image data using the [`requestImage(for:targetSize:contentMode:options:resultHandler:)`](/documentation/Photos/PHImageManager/requestImage(for:targetSize:contentMode:options:resultHandler:)) method, or for a video object using one of the methods listed in Requesting Video Objects, the image manager returns a numeric identifier for the request. To cancel the request before it completes, provide this identifier when calling the [`cancelImageRequest(_:)`](/documentation/Photos/PHImageManager/cancelImageRequest(_:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)