<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/ArtworkImage/init(_:width:height:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "MusicKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:17_MusicKit_SwiftUI12ArtworkImageV_5width6heightAC0aB00E0V_14CoreFoundation7CGFloatVAKtcfc"
  },
  "title" : "init(_:width:height:)"
}
-->

# init(_:width:height:)

Creates an instance with a specified width and height.

```
nonisolated init(_ artwork: Artwork, width: CGFloat, height: CGFloat)
```

## Discussion

This initializer derives the
<doc://com.apple.documentation/documentation/Foundation/URL>
for loading the artwork image from the
<doc://com.apple.documentation/documentation/MusicKit/Artwork>
instance and the specified sizing parameters,
as well as the display scale for the current environment.

The loaded image and placeholder have constrained frames
from these sizing parameters.

---

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)