Is there a way to add a gif to a Markdown file?

后端 未结 9 1455
小蘑菇
小蘑菇 2021-01-29 17:43

I want to add this gif to a GitHub flavored markdown file. If it can\'t be done in GitHub, is it possible to do it in another version of markdown?

相关标签:
9条回答
  • 2021-01-29 18:43

    If you can provide your image in SVG format and if it is an icon and not a photo so it can be animated with SMIL animations, then it would be definitely the superior alternative to gif images (or even other formats).

    SVG images, like other image files, could be used with either standard markup or HTML <img> element:

    ![image description](the_path_to/image.svg)
    
    <img src="the_path_to/image.svg" width="128"/>
    
    0 讨论(0)
  • 2021-01-29 18:44

    in addition to all answers above:

    if you want to use a gif for your github repository README.md and don't want to address it from your root directory, it's not enough if you just copy the url of your browser, for example your browser URL is sth like:

    https://github.com/ashkan-nasirzadeh/simpleShell/blob/master/README%20assets/shell-gif.gif

    but you should open your gif in your github account and right click on it and click copy image address or sth like that which is sth like this:

    https://github.com/ashkan-nasirzadeh/simpleShell/blob/master/README%20assets/shell-gif.gif?raw=true

    0 讨论(0)
  • 2021-01-29 18:46

    you can use ![ ](any link of image)

    Also I would suggest to use https://stackedit.io/ for markdown formating and wring it is much easy than remembering all the markdown syntax

    0 讨论(0)
提交回复
热议问题