Please provide commands to import PNG and SVG images from jar files

+1 vote
asked Jan 7, 2016 in Closed feature request by anonymous
Currently we can define  external sprites (image from the filesystem) or internal sprites (textual representation).

Please provide also commands to import PNG and SVG images from jar files.

As an example, syntax could be something like

sprite foo1 jar:icons/archimate/business-process-16.png

1 Answer

0 votes
answered Oct 11, 2016 by Serge Wenger Work (14,600 points)
selected Jul 8, 2018 by Anthony-Gaudino
Best answer

You can import available sprites from the PlantUML STDLIB (

You can import available Archmate sprites (, sprite could be read from embedded png file:

sprite $aService jar:archimate/application-service

You can also import from your filesystem:

sprite foo1 sprite1.png
Alice->Bob : hello <$foo1> there

with last beta

You can have:

sprite foo1 some_file.jar~sprite1.png
Alice->Bob : hello <$foo1> there

Where ~ delimits the file name (could be zip or jar) and the entry name in the zip/jar file.
This has not been highly tested...

You can also import SVGs:

sprite foo1
sprite foo2 sprite2.svg
commented Nov 3, 2016 by Serge Wenger Work (14,600 points)
Thank you.
It works.
commented Dec 6, 2020 by Marius

Hi, I noticed that scaling of svg sprites won't work (but it does work for png/jpg files).


sprite foo2 sprite2.svg
rectangle "<$foo2{scale=0.2}>"

The surrounding rectangle gets scaled down, but the sprite still has the original size.

commented Dec 7, 2020 by Serge Wenger Work (14,600 points)
Please create a new message for this problem. Otherwise it will be never be trated by PlantUML team.
commented Dec 14, 2020 by The-Lu (45,820 points)


For traceability: See created by Marius.