Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Big gif from a third party site does not show in the README.md of github?

Tags:

github

readme

I want to show a gif in a README.md of github. And it works fine when the target gif is small with:

<img src="targetGifUrl" width="400">

but when the gif is big, it is not showing as expected, take this gif as an example. When I add it into README.md, it just shows:

enter image description here

and after clicking, it shows a website with the tip

Content length exceeded

As the gif is from a third site, I can not change its size.

So, is it possible to show this big gif without saving and resizing it?

like image 696
AssIstne Avatar asked Feb 16 '17 02:02

AssIstne


People also ask

Can you use gifs on GitHub?

Now you can search GIPHY straight from any comment box in GitHub, and add a GIF to your wordy masterpiece in a matter of seconds. No more trying to find a GIF that's under 10MB, no more manual tab opening and searching, no more writing your own markdown — just living your best GIF life.


1 Answers

It looks like someone else had this issue before,

When I open this link in Firefox, I only get the text "Content length exceeded".

and here is the commit that fixed it.

Add gif locally

-![Sample Gif](http://i.imgur.com/______.gif)

+<img src="/art/sample.gif?raw=true" width="200px">

Looks like all you have to do is save the gif and put it in your repository, no need to resize it, just link to the version in your repository. Notice how the width is specified and raw=true is an included parameter.

like image 131
Noam Hacker Avatar answered Sep 19 '22 12:09

Noam Hacker