Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to center an image in Azure DevOps

I uploaded an image as attachment in my wiki page... here the code generated to the page:

![myImage.png](/.attachments/MyImage_3-dc7eb2d3-c632-4fe3-831a-b5dbfcbf1d98.png)

I would like to center this image. But I cannot.

I tried to wrap that YAML code inside an HTML div.. but it's like i cannot insert YAML tags inside HTML tag...

I also tried to add the style tag, but style tag is not supported in Azure devOps Wiki pages.

Finally I tried to add a HTML img tag instead of yaml, but it does not recognize therelative path of the uploaded image...

Does a way to center the image exist?

Thank you

like image 335
Ciccio Avatar asked Jan 03 '19 12:01

Ciccio


People also ask

Does Azure DevOps support mermaid?

Developer Community. Currently, mermaid diagrams are supported in Azure DevOps Wiki only. It would be helpful to extend the support to all markdown file in the repository, either in preview and/or in the files section of a pull request.

Does Azure DevOps support markdown?

Here you can find some basic Markdown syntax guidance and specific guidance for using Markdown in Azure DevOps features. You can use both common Markdown conventions and GitHub-flavored extensions.

What markdown does Azure DevOps use?

Azure DevOps uses standard Markdown syntax.


1 Answers

Nowadays

Based on the answer of rickvdbosch it can be done simply with:

<center>

![image.png](/.attachments/image-b2195f3b-f3af-467b-b9d6-0853b1cd7d08.png)

</center>

Without the need of a blob storage in Azure but just with the relative path created by Azure DevOps when inserting the image.

Steps:

  1. Copy paste an image in the wiki editor / markdown, or use the insert file menu command
  2. Put the <center> tags around it
  3. Add some padding or other styling to the <center> tag
like image 80
Bernoulli IT Avatar answered Oct 02 '22 20:10

Bernoulli IT