Please provide a way to include Data URI bitmap images in diagrams

+1 vote
asked Sep 6, 2015 in Closed feature request by anonymous

Please provide a way to include Data URI images in diagrams.

Suggested syntax:

@startuml
start
:foo;
note left
You can use images <img:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=={scale=3}>
end note
stop
@enduml

Where {scale=3} defines the image scale.

1 Answer

+2 votes
answered Sep 6, 2015 by plantuml (294,660 points)
selected Jul 14, 2018 by Anthony-Gaudino
 
Best answer

In the last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

@startuml
start
:foo;
note left
You can use images <img:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==>
end note
stop
@enduml

With size definition:

@startuml
start
:foo;
note left
 You can use images <img:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=={scale=3}>
end note
stop
@enduml

Note that base64 has to be on a single line. We will try to add the hability to have data on several lines.


You can also do:

@startuml
start
:foo;
note left
 You can use images
<img:http://plantuml.com/logoc.png{scale=2}>
end note
stop
@enduml

And also using creole engine (see http://plantuml.com/creole.html ), you can have:

start
:foo;
note left
 You can use images
<img:http://plantuml.com/logoc.png>
end note
stop

Is this what you are looking for ?

commented Sep 6, 2015 by anonymous
Awesome!
Thank you!
...