Transform Image URL to Base64

Tags: #<Tag:0x00007fc91067d870> #<Tag:0x00007fc91067d5a0>

I’am trying to integrate my sonos devices using sonos2mqtt. I setup a channel to retrieve the image URL of the album art but since the image item needs base64 data of the image I wonder if there is a simple way to download and encode the image with a javascript transformation?

Regards,

Martin