Search code examples
markdowngifgithub-flavored-markdown

Is there a way to add an animated GIF to a Markdown file?


I want to add this animated 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?


Solution

  • Showing gifs need two things

    1- Use this syntax as in these examples

    ![Alt Text](https://media.giphy.com/media/vFKqnCdLPNOKc/giphy.gif)

    Yields:

    Alt Text

    2- The image url must end with gif

    3- For posterity: if the .gif link above ever goes bad, you will not see the image and instead see the alt-text and URL, like this:

    Alt Text

    4- for resizing the gif you can use this syntax as in this Github tutorial link

    <img src="https://media.giphy.com/media/vFKqnCdLPNOKc/giphy.gif" width="40" height="40" />
    

    Yields: