How to delete a picture source


So my question is pretty simple.
I just want to to delete a picture source !

I read in the documentation that

Gets or sets the Picture’s source URL, which can be any valid image (png, jpg, gif, etc) URL.
The default value is the empty string, which specifies no image source.

So I’m expecting if I change the source to an empty string I will remove the image.
However if I do that I get an error.

Element has no source (“src”) attribute: [object HTMLImageElement]

This is what I tried here on codesandbox.
Just click on the button below the Diagram to change the source to an empty string.

I tried with empty string, undefined, null and ’ ’ (space).
For the empty string the App crashes with an error.
For undefined, I don’t see any changes.
For the two last ones, I get what I want on the Diagram but when I open the Network Tab on the Debugger I see that the browser is looking for pictures on /null url. Which is normal, and wrong … I guess.

So what did I miss here ?

Thanks for you time.

The default value for Picture.source property is the empty string. When I modify a Picture that is showing an image by setting its source property to the empty string, I find that the image disappears from view, as I think you are expecting. There is no exception.

Could you please tell us how to reproduce the problem?

Hi Walter, and thanks for your reply.
I added the example on Sandbox in my first comment.

We’re looking into this…

1 Like

We have released 2.1.27 on our web site and at GitHub. npm and nuget may take a while.

1 Like