Skip to main content

I’m currently trying to create images on a Miro board using the SDK. 

I have the images stored as base64 data URLs. But it seems the method isn’t accepting that format. 

Here the code I’m using: 

miro.board.widgets.create({
"type": "image",
"url": "data:image/png;base64,iVBORw0KGgoAA..."
})

The error message I get: 

Error: 'url' field is required for ImageWidget

Does the method only accept regular url’s? I wasn’t able to find an answer in the docs. 
 

Hi @Daniel Wirtz,

 

The current version of the SDK only supports Image widget creation from an existing URL (a hosted image). It does not support a base64 encoded image.

 

I will raise this requirement to the technical team to have it in our backlog.
 

 


I thought this would be the only option. But if possible I would rather use the base64 encoded images, because then everything can stay inside the plugin and it’s more privacy friendly. 
 


Hi @Anthony Roux, it would also be great to be able to define image widgets via a “data:image/svg+xml” scheme/mime-type -- for small icon like images it would allow to avoid storing images in a server with an absolute url, allow to create/update images programmatically from the plugin etc. It would definitely be a highly valuable feature.


Reply