[feat] Use Cover Art Archive for albums with MusicBrainz IDs #10

Closed
opened 2026-02-07 19:34:57 -07:00 by sproutsberry · 4 comments
sproutsberry commented 2026-02-07 19:34:57 -07:00 (Migrated from github.com)

Instead of uploading the cover art of every album you want to display on a user's profile, a better alternative would be to default to the MusicBrainz Cover Art Archive API for tagged albums. This eliminates the reliance on external services for private Navidrome instances, and results in faster updates as the images can be smaller and no longer need to be uploaded to a file host first.

https://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5
{
  "images": [
    {
      "approved": true,
      "back": false,
      "comment": "",
      "edit": 96644755,
      "front": true,
      "id": 34782911204,
      "image": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204.png",
      "thumbnails": {
        "250": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-250.jpg",
        "500": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-500.jpg",
        "1200": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-1200.jpg",
        "large": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-500.jpg",
        "small": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-250.jpg"
      },
      "types": [
        "Front"
      ]
    }
  ],
  "release": "https://musicbrainz.org/release/513ff8a4-1add-435c-9ac7-710e569248e5"
}

https://coverartarchive.org/release/<release_id>/front can also be used to link directly to the cover. See the full documentation here.

My own Navidrome rich presence (which I'm looking to retire) exclusively uses it if you want to see a reference implementation.

Instead of uploading the cover art of every album you want to display on a user's profile, a better alternative would be to default to the MusicBrainz Cover Art Archive API for tagged albums. This eliminates the reliance on external services for private Navidrome instances, and results in faster updates as the images can be smaller and no longer need to be uploaded to a file host first. ``` https://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5 ``` ```json { "images": [ { "approved": true, "back": false, "comment": "", "edit": 96644755, "front": true, "id": 34782911204, "image": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204.png", "thumbnails": { "250": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-250.jpg", "500": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-500.jpg", "1200": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-1200.jpg", "large": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-500.jpg", "small": "http://coverartarchive.org/release/513ff8a4-1add-435c-9ac7-710e569248e5/34782911204-250.jpg" }, "types": [ "Front" ] } ], "release": "https://musicbrainz.org/release/513ff8a4-1add-435c-9ac7-710e569248e5" } ``` `https://coverartarchive.org/release/<release_id>/front` can also be used to link directly to the cover. See the full documentation [here](https://musicbrainz.org/doc/Cover_Art_Archive/API). [My own Navidrome rich presence](https://codeberg.org/sprouts/vencord-subsonic-rpc/src/branch/main/index.ts#L103) (which I'm looking to retire) exclusively uses it if you want to see a reference implementation.
deluan commented 2026-02-08 10:01:58 -07:00 (Migrated from github.com)

Yeah, I though about that (even created an example using CAA), but there is a couple of issues with this approach:

  • Not all users have MBIDs in their libraries. It is more the exception than the norm.
  • Lots of albums that have MBID do not have their cover in CAA, so for this to be effective we would need to query CAA first, to make sure the cover exists there.

Question: what is the issue you see with using uguu.se? Is it a privacy or a technical concern?
The images uploaded are already small (300x300), and I think we can improve the caching by checking if the original upload is already cached by Discord, even if it has expired in uguu, it would still be valid in Discord.

But if your concern is privacy, then this can be done, but with the limitations I mentioned above, and I'm not sure if this will be a great solution in this case, as it is very limiting for most users.

WDYT?

Yeah, I though about that (even created [an example](https://github.com/navidrome/navidrome/tree/master/plugins/examples/coverartarchive-py) using CAA), but there is a couple of issues with this approach: - Not all users have MBIDs in their libraries. It is more the exception than the norm. - Lots of albums that have MBID do not have their cover in CAA, so for this to be effective we would need to query CAA first, to make sure the cover exists there. Question: what is the issue you see with using uguu.se? Is it a privacy or a technical concern? The images uploaded are already small (300x300), and I think we can improve the caching by checking if the original upload is already cached by Discord, even if it has expired in uguu, it would still be valid in Discord. But if your concern is privacy, then this can be done, but with the limitations I mentioned above, and I'm not sure if this will be a great solution in this case, as it is very limiting for most users. WDYT?
sproutsberry commented 2026-02-08 10:13:39 -07:00 (Migrated from github.com)

I proposed this being used as a (toggle-able) default alongside other options, rather than an alternative. From my experience, over 95% of the (rather obscure) albums I want to listen to on MusicBrainz have correct covers attached. Given Navidrome is already pretty heavy on MusicBrainz support I think a lot of users are generally more inclined to tag their albums too.

I think it's a non-issue to query CAA first as you already need to do that to get valid cover options.

I'm not a fan of relying on external services like this when not necessary, because you're relying on someone to maintain their side project in perpetuity and deal with any policy changes as they pop up (see: Imgur). I'm sure it would be more respectful to the host to not upload files that are already served on the internet elsewhere, as well.

I didn't know the covers were downscaled before upload though, that makes me more inclined to use uguu as a backup.

I proposed this being used as a (toggle-able) default alongside other options, rather than an alternative. From my experience, over 95% of the (rather obscure) albums I want to listen to on MusicBrainz have correct covers attached. Given Navidrome is already pretty heavy on MusicBrainz support I think a lot of users are generally more inclined to tag their albums too. I think it's a non-issue to query CAA first as you already need to do that to get valid cover options. I'm not a fan of relying on external services like this when not necessary, because you're relying on someone to maintain their side project in perpetuity and deal with any policy changes as they pop up (see: Imgur). I'm sure it would be more respectful to the host to not upload files that are already served on the internet elsewhere, as well. I didn't know the covers were downscaled before upload though, that makes me more inclined to use uguu as a backup.
deluan commented 2026-02-08 10:41:14 -07:00 (Migrated from github.com)

There is also the issue of the cover not being the one you selected to add to your library.

Well, anyway, I'm open to add this as an toggle-able option in the config, but I won't be doing this myself: This plugin was created mainly to show off Navidrome's plugin capabilities and I rather spend time improving Navidrome itself.

Feel free to submit a PR :)

There is also the issue of the cover not being the one you selected to add to your library. Well, anyway, I'm open to add this as an toggle-able option in the config, but I won't be doing this myself: This plugin was created mainly to show off Navidrome's plugin capabilities and I rather spend time improving Navidrome itself. Feel free to submit a PR :)
sproutsberry commented 2026-02-08 10:59:52 -07:00 (Migrated from github.com)

Sounds good :) I'll look into doing that soon!

Sounds good :) I'll look into doing that soon!
Sign in to join this conversation.