Skip to content
DocumentationAPI Reference

Add Custom Playlist Cover Image

playlists.images.update(strplaylist_id, objectbody) -> BinaryResponseContent
PUT/playlists/{playlist_id}/images

Replace the image used to represent a specific playlist.

ParametersExpand Collapse
playlist_id: str

The Spotify ID of the playlist.

Base64 encoded JPEG image data, maximum payload size is 256 KB.

formatbinary
ReturnsExpand Collapse
BinaryResponseContent

Add Custom Playlist Cover Image

import os
from spotted import Spotted

client = Spotted(
    access_token=os.environ.get("SPOTIFY_ACCESS_TOKEN"),  # This is the default and can be omitted
)
image = client.playlists.images.update(
    playlist_id="3cEYpjA9oz9GiPac4AsH4n",
    body=b"raw file contents",
)
print(image)
content = image.read()
print(content)
Returns Examples