Add pictures to participants in sequence diagramm

0 votes
asked 1 day ago in Question / help by J.B.
Hello all!

Is it possible to add a picture to the participant of a sequence diagram?

Many thanks in advance for your help.

Best regards,
J.B.

2 Answers

0 votes
answered 1 day ago by The-Lu (89,160 points)

Hello J.,

Yes just by adding creole IMG tag (with link to an image), as:

@startuml
participant "<img:https://plantuml.com/logo3.png>" as a
a -> b
return
@enduml

See doc. here:

Enjoy,
Th.

commented 10 hours ago by J.B.

Hi Th.,

thanks for your reply.
When I try this, the error message 

(Cannot decode: https://plantuml.com/logo3.png)

is shown in the participant box

Regards,
J.B.

commented 9 hours ago by Serge Wenger Work (16,630 points)

Hello,
I think your plantUML server has not Internet Access. If you do it with the PlantUML main server:

0 votes
answered 3 hours ago by The-Lu (89,160 points)

Hello J.,

Another solution is to use local sprite or emoji, as:

@startuml
sprite UserRound <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25Z" ></path>
<path d="M12.1303 13C13.8203 13 15.1903 11.63 15.1903 9.94C15.1903 8.25001 13.8203 6.88 12.1303 6.88C10.4403 6.88 9.07031 8.25001 9.07031 9.94C9.07031 11.63 10.4403 13 12.1303 13Z"></path>
<path d="M6.5 19.11C6.80719 17.8839 7.51529 16.7956 8.51178 16.0179C9.50827 15.2403 10.736 14.818 12 14.818C13.264 14.818 14.4917 15.2403 15.4882 16.0179C16.4847 16.7956 17.1928 17.8839 17.5 19.11"></path>
</g>
</svg>

participant "<$UserRound>" as a
participant "<:1f600:>" as b

a -> b
return
@enduml

See doc. here:

Regards,
Th.

...