<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.13.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "iTunesLibrary",
  "identifier" : "/documentation/iTunesLibrary/ITLibrary/artwork(forMediaFile:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "iTunes Library"
    ],
    "preciseIdentifier" : "c:objc(cs)ITLibrary(im)artworkForMediaFile:"
  },
  "title" : "artwork(forMediaFile:)"
}
-->

# artwork(forMediaFile:)

Retrieves the artwork from a media file that may or may not be in the iTunes library.

```
func artwork(forMediaFile mediaFileURL: URL) -> ITLibArtwork?
```

## Parameters

`mediaFileURL`

The URL of the media file whose artwork you want to retrieve. The media file may or may not be in the iTunes library.

## Return Value

An [`ITLibArtwork`](/documentation/iTunesLibrary/ITLibArtwork) instance representing the media file artwork, or `nil` if the media file doesn’t contain any artwork or the system can’t extract the artwork.

## Discussion

---

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)