---
title: cgImage
framework: UIKit
role: symbol
role_heading: Instance Property
platforms: [iOS 2.0+, iPadOS 2.0+, Mac Catalyst 13.1+, tvOS, visionOS 1.0+, watchOS 2.0+]
path: uikit/uiimage/1624147-cgimage
---

# cgImage

The underlying Quartz image data.

## Declaration

```swift
var cgImage: CGImage? { get }
```

## Discussion

If the image data has been purged because of memory constraints, invoking this method forces that data to be loaded back into memory. Reloading the image data may incur a performance penalty.

If the `UIImage` object was initialized using a `CIImage` object, the value of the property is `NULL`.

## See Also

### Getting the image data

- [ciImage](ciimage.md)
- [images](images.md)
- [imageAsset](imageasset.md)
