19

I am trying to resize my gif that is to be displayed in Github. The gif is in a folder in the repository. I have tried a lot of the solutions but they do not work.

Changing image size in Markdown

![Alt Text](/images/output/video1.gif =250x250)

Resize image in the wiki of GitHub using Markdown

<img src="https://github.com/asd/privategithubrepo/images/output/video1.gif" width="48">
Kong
  • 2,202
  • 8
  • 28
  • 56
  • 1
    Have you checked the HTML using your browsers "view source" or "inspect" tool? Using the cited solutions, what HTML are you seeing for the `img` tag? – Waylan Jan 04 '19 at 13:56
  • 1
    Note that, as explained in [github/markup](https://github.com/github/markup), a sanitation filter is run on the output of the Markdown parser which strips various things. Interestingly, 3 months ago, they [removed the link](https://github.com/github/markup/commit/56a58500418779ee3e06db2bfcd86654acbf2ce7) to the [sanitizer](https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/sanitization_filter.rb) without any explanation. That sanitation filter included `width` and `height` in the whitelist of approved attributes, but if they are using a different filter now... – Waylan Jan 04 '19 at 14:02

1 Answers1

31

you can use HTML syntax for this purpose

<img src="/images/output/video1.gif" width="250" height="250"/>

I think this will work.

ujjal das
  • 897
  • 11
  • 15