Having the same issue. If I add an artwork with the size of 96x96 it DOES work properly to get the smaller size but now when you tap the smaller artwork to expand, it uses the small art which of course is now pixelated. Guessing it has something to do with scaling as the issue presents itself in reverse depending on which size art you feed mediaSession first.
//mediaSession update
if ('mediaSession' in navigator) {
navigator.mediaSession.metadata = new MediaMetadata({
title: title,
artist: artist,
album: album,
artwork: [
{ src: cover + '&h=96&w=96', sizes: '96x96', type: 'image/jpg' },
{ src: cover + '&h=128&w=128', sizes: '128x128', type: 'image/jpg' },
{ src: cover + '&h=192&w=192', sizes: '192x192', type: 'image/jpg' },
{ src: cover + '&h=256&w=256', sizes: '256x256', type: 'image/jpg' },
{ src: cover + '&h=384&w=384', sizes: '384x384', type: 'image/jpg' },
{ src: cover + '&h=512&w=512', sizes: '512x512', type: 'image/jpg' }
]
});
}
Also, if I use the large 512px size art only, there are times when I can expand the small player artwork (which is empty) and then when you tap the larger artwork to make it a small player again, it does assign the artwork to the small player.
Not sure why this is still a problem - Come on Apple.
(Sorry for the comment & post - realized it after I posted as a comment which limits character to 500)