<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PaperKit",
  "identifier" : "/documentation/PaperKit/ImageMarkup",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "PaperKit"
    ],
    "preciseIdentifier" : "s:8PaperKit11ImageMarkupV"
  },
  "title" : "ImageMarkup"
}
-->

# ImageMarkup

A markup element that represents an image.

```
struct ImageMarkup
```

## Topics

### Creating an image markup

[`init(image: CGImage, frame: CGRect, rotation: CGFloat, orientation: CGImagePropertyOrientation, opacity: CGFloat, contentsBounds: CGRect, accessibilityDescription: String?, allowedInteractions: MarkupInteractions, id: MarkupID<ImageMarkup>)`](/documentation/PaperKit/ImageMarkup/init(image:frame:rotation:orientation:opacity:contentsBounds:accessibilityDescription:allowedInteractions:id:))

Initializes and returns a new image markup from the specified parameters.

[`init?(image: NSImage, frame: CGRect, rotation: CGFloat, opacity: CGFloat, contentsBounds: CGRect, accessibilityDescription: String?, allowedInteractions: MarkupInteractions, id: MarkupID<ImageMarkup>)`](/documentation/PaperKit/ImageMarkup/init(image:frame:rotation:opacity:contentsBounds:accessibilityDescription:allowedInteractions:id:)-1ggjv)

Initializes and returns a new image markup from the specified parameters.

[`init?(image: UIImage, frame: CGRect, rotation: CGFloat, opacity: CGFloat, contentsBounds: CGRect, accessibilityDescription: String?, allowedInteractions: MarkupInteractions, id: MarkupID<ImageMarkup>)`](/documentation/PaperKit/ImageMarkup/init(image:frame:rotation:opacity:contentsBounds:accessibilityDescription:allowedInteractions:id:)-8y6o9)

Initializes and returns a new image markup from the specified parameters.

### Accessing image content

[`var image: CGImage?`](/documentation/PaperKit/ImageMarkup/image)

The image content displayed by this markup.

[`func replaceImage(with: URL) throws`](/documentation/PaperKit/ImageMarkup/replaceImage(with:)-10qzi)

Replaces the contents of this image markup with an image file.

[`func replaceImage(with: CGImage)`](/documentation/PaperKit/ImageMarkup/replaceImage(with:)-6eb53)

Replaces the contents of this image markup with a `CGImage`.

[`var orientation: CGImagePropertyOrientation`](/documentation/PaperKit/ImageMarkup/orientation)

The orientation of the image content.

[`var contentsBounds: CGRect`](/documentation/PaperKit/ImageMarkup/contentsBounds)

The portion of the image to display, in normalized coordinates.

### Configuring appearance

[`var opacity: CGFloat`](/documentation/PaperKit/ImageMarkup/opacity)

The opacity of the image.

[`var accessibilityDescription: String?`](/documentation/PaperKit/ImageMarkup/accessibilityDescription)

The accessibility description of the image for assistive technologies.

### Identifying markup

[`var id: MarkupID<ImageMarkup>`](/documentation/PaperKit/ImageMarkup/id)

Stable unique identity of the markup.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Markup`](/documentation/PaperKit/Markup)

[`Identifiable`](/documentation/Swift/Identifiable)

---

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)