class spotify.Image(session, uri=None, sp_image=None, add_ref=True, callback=None)[source]

A Spotify image.

You can get images from Album.cover(), Artist.portrait(), Playlist.image(), or you can create an Image yourself from a Spotify URI:

>>> session = spotify.Session()
# ...
>>> image = session.get_image(
...     'spotify:image:a0bdcbe11b5cd126968e519b5ed1050b0e8183d0')
>>> image.load().data_uri[:50]

If callback isn’t None, it is expected to be a callable that accepts a single argument, an Image instance, when the image is done loading.

class spotify.ImageFormat(value)[source]
class spotify.ImageSize(value)[source]