Fetch an album or artist image url: "The Beatles" ➔ http://path/to/beatles.jpg
cannabilized their own API and broke many applications, including this one. This library now uses Spotify for image data. The usage for
album-art has changed slightly but is fully backwards-compatible. Please report any errors.
- Use anywhere, browser or Node - UMD (Browser Support)
- Promise and Callback API
- Fetch images for albums or artists
- Multiple size options
- Uses Spotify for image data
$ npm install -g album-art
In the browser:
<!-- albumArt window global -->
(via Unpkg, or via JSDelivr)
const albumArt =//=>
Usage with album and size options
albumArt(artist [, options] [, callback])
Accepts an artist string to search for. Returns a Promise which resolves to a string URL.
Artist to search for.
Function to be called on complete or on error.
Album to search for.
Requested image size.
You can also run as a CLI app by installing it globally:
$ npm install --global album-art$ album-art --helpUsage$ album-art artist [album] [size]Example$ album-art 'The Beatles' --album 'Abbey Road' --size 'large'http://path/to/beatles/abbey_road_large.jpg
This package uses the ~Last.fm~ Spotify API for it's data. You may consult the Spotify API Terms of Service for license details.