Answered

Error: 'url' field is required for ImageWidget

  • 29 July 2021
  • 2 replies
  • 45 views

Userlevel 1
Badge +3

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. 
 

icon

Best answer by Anthony Roux 2 August 2021, 12:16

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.
 

 

View original

2 replies

Userlevel 4
Badge +6

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.
 

 

Userlevel 1
Badge +3

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. 
 

Reply