<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AddressBook",
  "identifier" : "/documentation/AddressBook/ABImageClient/consumeImageData(_:forTag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Address Book"
    ],
    "preciseIdentifier" : "c:objc(pl)ABImageClient(im)consumeImageData:forTag:"
  },
  "title" : "consumeImageData(_:forTag:)"
}
-->

# consumeImageData(_:forTag:)

Gets the image data for the given tag that was initiated by an asynchronous fetch.

```
func consumeImageData(_ data: Data!, forTag tag: Int)
```

## Parameters

`data`

A pointer to a data object that will be set to an `NSImage`/QuickTime compatible format, or `nil` if no image could be found.

    You can use this image data with the     `initWithData:`     method of the     `NSImage`     class.

`tag`

The tag returned from a previous call to the `ABPerson` [`beginLoadingImageData(for:)`](/documentation/AddressBook/ABPerson/beginLoadingImageData(for:)) method.

## Discussion

In the case of a multithreaded application, this method is always called on the main thread.

---

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)