Fetch album artwork with AppleScript

Goodness gracious, there are more properties for a track in the iTunes .sdef than I could ever imagine. However, one that is notably absent is the album artwork. Since this is not directly a property, is there some other way I can retrieve a track's album artwork?

Posted on Sep 12, 2016 10:43 AM

Reply
2 replies

Sep 12, 2016 11:03 AM in response to stevejobsfan0123

Artwork is an element of a track, not a property. Tracks can have multiple pieces of artwork, each of which has its own set of properties.


It's pretty trivial to obtain, though:


tell application "iTunes"

set myArtwork to every artwork of track 1 of playlist "Music"

end tell


Once you have that, you can parse the data however you want. For example, to extract the JPEG image, you can:


tell application "iTunes"

set myArtwork to first artwork of track 1 of playlist "Music"

if format of myArtwork is JPEG picture then set myPicture to data of myArtwork

end tell

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Fetch album artwork with AppleScript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.