---
title: "artwork(forMediaFile:)"
framework: ituneslibrary
role: symbol
role_heading: Instance Method
path: "ituneslibrary/itlibrary/artwork(formediafile:)"
---

# artwork(forMediaFile:)

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

## Declaration

```swift
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

Return Value An 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.
