Jekyll is not showing gifs

Viewed 577

I'm trying to put a gif onto my jekyll site.

I've tried the standard

![yay](assets/Animation/run.gif)

as well as:

<figure>
    <IMG SRC="assets/Animation/run.gif">
</figure>

but each time I just get the little blue question mark icon saying it can't find it? All the stuff I can find online seems to suggest it should 'just work'.

Any ideas as to what I'm doing wrong?

Page in question

1 Answers

You're using a "relative to current path" url : assets/Animation/run.gif

On a page with url like protocol://domain.tld/cat1/cat2/year/month/day/, this will resolve based on current path :

protocol://domain.tld/cat1/cat2/year/month/day/assets/Animation/run.gif

Which is wrong.

You must call you assets with "relative to root" urls :

![yay](/assets/Animation/run.gif)

or

<img src="{{ site.baseurl }}/assets/Animation/run.gif">
Related