<!--
{
  "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:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "MusicKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:17_MusicKit_SwiftUI12ArtworkImageV_5widthAC0aB00E0V_14CoreFoundation7CGFloatVtcfc"
  },
  "title" : "init(_:width:)"
}
-->

# init(_:width:)

Creates an instance with a specified width.

```
nonisolated init(_ artwork: Artwork, width: 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.

If you provide the width only, the artwork image calculates
the height dimension as a proportional length according to
the aspect ratio of the artwork.

---

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)