---
title: "replaceImage(with:)"
framework: paperkit
role: symbol
role_heading: Instance Method
path: "paperkit/imagemarkup/replaceimage(with:)-6eb53"
---

# replaceImage(with:)

Replaces the contents of this image markup with a CGImage.

## Declaration

```swift
mutating func replaceImage(with image: CGImage)
```

## Parameters

- `image`: The new image to display.

## Discussion

Discussion Image content is shown scaled to fill.
