What is the reason the portrait information only appears after engaging with the radio feature? It seems that using the radio app triggers some metadata to load, allowing my application access to it. Is this an expected functionality or could it be an issue with caching? Is there something I need to initialize prior to obtaining the portrait data?
This happens because of how Spotify manages resources. It only fetches and caches metadata when it actually needs it - that’s why the portrait shows up after using radio but vanishes when you restart. I’ve seen the same thing with track artwork. Images only load after you play something or search for it. You could fix this by triggering a lightweight artist lookup during app startup to preload the data. Or just use Spotify’s Web API directly for artist images if you need them to stick around - though you’ll need to set up authentication for that. Spotify does this caching thing on purpose to save memory.
yep, that’s just how spotify works with lazy loading. the portrait data isn’t available until you actually engage with the artist. maybe try calling sp.core.library.getArtists() or do a search for the artist before using getMetadata - could help load the image!
Weird quirk but totally normal for Spotify apps. Try prefetching with sp.core.browse() - browsing artist pages loads images way faster than search. Also check if there’s a cache refresh method you can call, might help keep the data between sessions.
This happens because Spotify loads images lazily - they only fetch when you’re actually using the app. When you use radio, it triggers API calls that fill in the portrait field, but that data doesn’t stick around between sessions. I’ve seen the same thing with album artwork - it’s consistent across all metadata types. What worked for me was creating a preload routine with sp.core.getMetadata() that grabs multiple related artists when the app starts up. This generates enough activity to kick off the image loading. Also worth checking if the artist has recent play history using sp.core.library.getPlayHistory() - sometimes that affects what gets cached. The fact that portraits disappear after restart confirms it’s just memory caching, not permanent storage.
Had this exact problem six months ago building an app for artist info. You’re seeing normal behavior - Spotify’s client loads image metadata on-demand for performance. The portrait field stays empty until user interaction triggers the fetch, which is why radio works but restarts clear it. Workaround that worked for me: make a dummy search query for the artist when your app starts. Use sp.core.library.search() with the artist name - this usually forces the metadata to load without user interaction. You’ll need to handle the search results and grab the right artist URI, but you get reliable portrait data from the start.