Images

A Device can have one or more references to a registered Image.

Album Art

A device can have one album art image attached. Register the image once, and then keep updating it.

/drivers/<driver_id>/device.js

class MyDevice extends Homey.Device {

  onInit() {
    this.image = new Homey.Image('jpg');
    this.image.setUrl(null);
    this.image.register()
        .then(() => {
            return this.setAlbumArtImage( this.image );
        })
        .catch(this.error);

    this.myDeviceApi.on('track', track => {
      const albumArtUrl = track.albumArtUrl; // e.g. https://www.example.com/track/abcd/image.png
      this.image.setUrl(albumArtUrl);
      this.image.update();
    });
  }