Cover Art Archive

From MusicBrainz Wiki
Revision as of 21:56, 3 November 2011 by RobertKaye (talk | contribs)
Jump to navigationJump to search

Introduction

The Cover Art Archive is a cooperation between the Internet Archive and MusicBrainz that aims to level the playing field for music cover art. Currently, there is no central repository of music cover art (e.g. the images of Audio CD covers) that is freely and easily accessible. The Cover Art Archive aims to fix this situation by creating a collection of cover art that is stored on the Internet Archive's servers and curated by the MusicBrainz community. The images for any release (e.g. an Audio CD) are indexed by MusicBrainz Release ID (MBID) and can be fetched by constructing a URL that is based on the MBID.

Fetching Cover Art

To construct the URL for the original size front cover for a release with a given MBID, replace (MBID) in the URL below with the MBID of the release:

 http://coverartarchive.org/release/(MBID)-front-000.jpg

For example, to fetch the cover art of Portishead's Dummy CD Audio, which has the MBID of 8f468f36-8c7e-4fc1-9166-50664d267127, you construct the following URL:

 http://coverartarchive.org/release/8f468f36-8c7e-4fc1-9166-50664d267127/front-000.jpg

Then all you need to do is an HTTP GET on that URL to download the cover art. Please note the the coverartarchive.org is only a redirect service when you request one of these URLs will either get a 404 (not found) response or a 307 (moved) redirect response that points to the full Internet Archive URL where the actual image is located. Any modern HTTP client should transparently handle the redirect. If you get a Not Found (404) error, this release does not have cover art in MusicBrainz. Note: The MBID is repeated in the URL because these cover art images are part of the normal Internet Archive collection and their naming convention is friendly to their visitors who might download individual images via their web browser. In order to allow the user to save multiple images to a directory on their own computer without overwriting existing files, each of the files names should be unique.

Supported Image Types

The URL structure allows fetching different types of cover art images and different resolutions of the images. All the details of the URL structure are shown here:

 http://coverartarchive.org/release/(MBID)/(type)-(page)[-(size)].jpg

In addition to the MBID already mentioned, (type) is also supported. Type can be one of:

 front, back, inner, booklet, sleeve, medium, obi, spine, box, other  

(TODO: define each of these)

Each of these types define a portion of cover art that could be stored. Not every release will have each of these, but this list conveys all the things that can be stored in the Cover Art Archive. The page argument indicates the zero based page for a given type. The front cover of a release can always be found using type front at page 000: front-000.jpg If the release includes a booklet, you can fetch each of the pages of the booklet by fetching:

 http://coverartarchive.org/release/8f468f36-8c7e-4fc1-9166-50664d267127/booklet-000.jpg
 http://coverartarchive.org/release/8f468f36-8c7e-4fc1-9166-50664d267127/booklet-001.jpg
 . . .

Finally, the optional (size) argument allows some control over which size of image you would like to fetch. If you would like to fetch the original size that was uploaded to the Cover Art Archive, omit the size parameter. If you would like the image where the largest side of the image is 500 or 250 pixels tall or wide, include the -500 (or -250) size argument. Initially the archive will only contain original sized images and 500 pixel thumbnails and 250 pixel thumbnails. If you need an image size that fits between these sizes, download the next larger one and resize it on the client.