Digital album art ... where does it come from?

When I’m playing music on my iPhone, relevant artwork is displayed – usually (but not always) the cover of the album where the song came from. (But not always, and sometimes it’s wildly off base – like, my version of Beethoven’s Ninth shows a picture of rapper Nas. But that’s another topic).

But I’ve noticed if I play the same song while in the car, a different picture shows on the car’s display. And what’s really weird: if i go to a different car, I may see a different picture.

So where is the picture coming from? It’s like every auto has its own music photo library, but that would be crazy.

I guess https://coverartarchive.org/ ?
https://coverartarchive.org/

Gracenote:

https://en.m.wikipedia.org/wiki/Gracenote

But none of this is addressing the OP’s question, I don’t think, which seems to be:

Why does the OP get different covers when playing the song on his iPhone, in his car, and in someone else’s car? They can’t all be coming from the same database or, if they are, the phone/car are querying the database differently than one another.

Exactly.

One suspects each different app is providing slightly different meta-information about the album to Gracenote or the equivalent, and the fuzzy matching algorithms are delivering different hits. There is some clue about this in the way that the bad matches have some weird correlation to the album they have been matched against.

There was a time when albums were identified by a digital fingerprint based upon a hash generated from the first few bytes of the tracks. This won’t work if the music has been subject to lossy compression. It worked well for most CDs, but that is now prehistory. So now matches need to rely on things like the album name, artist name, and the like. iTunes now Apple Music, tries to identify a CD as it is ripped, and mostly gets it right. But sometimes there are conflicts or multiple hits. Apple used to use Gracenote, I don’t know if they still do. The trouble is that Gracenote is partly crowd sourced, and partly relies on publishers to upload album info. So there are errors.
Music that is downloaded from Apple Music or the Apple Music store carries meta information with it, so should get things right. But ripped CDs are a crapshoot. CDs don’t carry any identifying information in the music stream. So heuristic matches are all you have. Compilation albums can trip up the matching too, as it may see the same digital fingerprint on multiple albums.

Album art can vary for the same release in different countries as well. I have a few albums where the cover art found is correct, but not for my country.

How you connect your iPhone to the car may affect things as well. Apple Carplay versus generic Bluetooth versus USB connection as a storage device. All of these will present things to the playing device in different ways, and the meta information available will vary for none at all, to file names, to the full meta information.

If the device doesn’t know whether the song came from a particular album, as a single, compilation, remaster, or radio/studio release, then it’ll just have to pick one of them and maybe even cycle through a couple. Classical music is even more complicated because you add the artist(s) who actually played it on top of the composer. So your device may see “Polonaise in A Flat Major, Opus 53 by Chopin” but that’s just sheet music. Is it the version played by Evegny Kissin? Valentina Lisitsa? Vladimir Horowitz? And which of their concerts/recordings was it? Without knowing that the album art is a total crapshoot.

F Vaughn, now that you mention it the variability seems to be on tracks that were ripped from CDs.