Skip to main content

Icons

tip

We host a collection of icons commonly found in software architecture diagrams for free to help you get started: https://icons.terrastruct.com.

Icons and images are an essential part of production-ready diagrams.

You can use any URL as value.

deploybackup
info

Using the D2 CLI locally? You can specify local images like icon: ./my_cat.png.

Icon placement is automatic. Considerations vary depending on layout engine, but things like coexistence with a label and whether it's a container generally affect where the icon is placed to not obstruct. Notice how the following diagram has container icons in the top-left and non-container icons in the center.

VPC 1 10.1.0.0./16Availability Zone AFirewall Subnet AEC2 Instance
info

Icons can be positioned with the near keyword introduced later.

Add shape: image for standalone icon shapes

servergithub