<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NowPlaying",
  "identifier" : "/documentation/NowPlaying/Artwork",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Now Playing"
    ],
    "preciseIdentifier" : "s:10NowPlaying7ArtworkV"
  },
  "title" : "Artwork"
}
-->

# Artwork

Artwork for a media item that can be requested at a specified size.

```
struct Artwork
```

## Overview

The following example shows how to attach artwork to a content value:

```swift
let content = MusicContent(
    id: track.id,
    songTitle: track.title,
    artistName: track.artist,
    albumName: track.album,
    type: .audio,
    duration: .finite(track.duration),
    artwork: Artwork(id: track.artworkID) { size in
        let data = await loadArtworkData(size: size)
        return try ArtworkRepresentation(data: data)
    }
)
```

## Topics

### Initializers

[`init(id: String, artworkProvider: (CGSize) async throws -> ArtworkRepresentation)`](/documentation/NowPlaying/Artwork/init(id:artworkProvider:))

Creates an artwork whose image data loads on demand at the requested size.

### Instance Properties

[`let id: String`](/documentation/NowPlaying/Artwork/id)

A unique identifier for this artwork, which the system uses to cache artwork across fetches.

## Relationships

### Conforms To

[`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)