Allow specifying diagram dimensions (or at least width/maxWidth) for Kroki diagrams in markdown

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

What am I trying to do?

I am trying to render a couple of simple sequence diagrams with D2 (which is our project-wide tool for diagrams). I am writing the docs in .md files within a project.

What's the result

The problem is, that by default all diagrams rendered with Kroki are set to automatically take up to 100% of space which is unnecessary for smaller diagrams.

What I want as a result

A diagram image that is limited to XYZpx of width.

Possible solutions

It would be nice, to set either maxWidth or width for those diagrams (possibly height as well). I'd even settle on wrapping it with <div style="max-width: 500px">...</div> if it was possible within GitLab markdown. I know there is a way of passing options to PlantUML, but I don't think this works with Kroki (or at least I haven't been able to do it or find any reference to it in GitLab docs).

Edited by 🤖 GitLab Bot 🤖