How can we insert an image or plantuml diagram in a Question?

0 votes
asked Apr 17, 2019 in Question / help by rd27 (460 points)
Is there a way to upload and insert an image into a Question in the Q&A?

And on a related note, is there a way to generate a plantuml diagram in a Question?

Thx,

d

1 Answer

+2 votes
answered Apr 23, 2019 by 27escape (260 points)
The best way to include an example is to provide a link to the public plantuml server, that has your example code in it. The page has an option to get the link to a PNG or SVG file if that is required, though for most purposes the link including the code would be most beneficial to the readers of this forum.

The starting link is at http://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000, each time you submit a change then a new link will be generated
commented Oct 27, 2022 by Frank (100 points)

This is nice, I added some diagrams to my query and I hope it made the question more clear.

But I have a question about it.

So I go to http://www.plantuml.com/plantuml and enter my code, it generates a diagram. I right-click "PNG" on that page and copy the link. Then I click your "landscape" icon, it asks for a URL and I paste in the link. Now the picture is copied to the question or comment. Cool.

BUT - as I understand it, the URL contains the source code, right? So the picture is generated by the server when the URL is fetched.

When you change the server (for example you implemented a change for the problem I was having with swimlanes) then a link to the server, with the same URL, might result in a different picture, right?

So my question is, when I enter the URL and a picture appears in the question/comment, is that picture copied to the question/query as an image, or is it copied as a URL? Because if it's a URL, and the picture is fetched when someone looks at the question next year after the server has had changes, they might see a different picture and it would be confusing.

Thanks

Frank

commented Nov 29, 2022 by Frank (100 points)

I've found the answer, the picture is copied as a URL rather than as an image. This means that when a bug in the server is fixed, the image changes. For example the image attached to my comment in the other thread has now changed, and since the problem I was asking about has been fixed the image no longer illustrates the problem but now contradicts the rest of the comment.

So, is there a way to upload and insert an image into a Question in the Q&A?

commented Nov 29, 2022 by 27escape (260 points)

Hi Frank, You will need somewhere online to store your picture so that you can include a URL to it when asking or replying to a question. This link https://github.com/tgirke/my_gist_images may have a good suggestion, put your images in github, you can always create a repo for just this purpose.

sample image

Hope this helps

Kevin

...