Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing image size in Markdown on Gitlab

I'm trying to post a picture to a file on my Gitlab using markdown

    ![](test/media/screenshot.png) 

seems to work but is far too large. Other solutions I've tried and don't seem to work are as follows:

    <img src="https://gitlab.com/example/screenshot" width="48">     ![](test/media/screenshot.png =100x20)     ![](test/media/screenshot.png =250x)     <img src="https://gitlab.com/example/screenshot" alt="Drawing" style="width: 200px;"/> 

Any ideas on what I can do rather than re-sizing every image I have?

like image 492
Ben Kelly Avatar asked Mar 02 '18 17:03

Ben Kelly


People also ask

Can you resize an image in Markdown?

Unfortunately, there is no support for resizing an image using the Markdown syntax. Raw HTML needs to be used to change the image size in Markdown.

How do I add an image to GitLab Markdown?

To insert images to your markdown file, use the markup ![ ALT](/path/image. ext) . The path can either be relative to the website, or a full URL for an external image.


1 Answers

Raw HTML works
Try the following: after uploading your image, use img tag with src pointing to the path of uploaded image, for me it's working:
The following is from one of my files

![](/uploads/d19fcc3d3b4d313c8cd7960a343463b6/table.png) <img src="/uploads/d19fcc3d3b4d313c8cd7960a343463b6/table.png"  width="120" height="120"> 

enter image description here

Check this link, where I've put different size of same image https://gitlab.com/Basel.issmail/resize-image/wikis/resizing-image

There is an issue on gitlab discuss Add control over images with Markdown

like image 124
Basel Issmail Avatar answered Sep 21 '22 20:09

Basel Issmail