oleeskild / obsidian-digital-garden

MIT License
1.36k stars 125 forks source link

GIFs working on some pages and not working in others #527

Open f-mc2 opened 10 months ago

f-mc2 commented 10 months ago

In my Obsidian vault, I am using a couple of GIFs from Wikipedia and other (open) sources, and I would really like to have them work only in the Digital Garden.

Given my almost total ignorance in these matters, I just treated them as images, used ![[/PATH/TO/GIF]], and published the notes.

For reasons beyond my understanding, the GIF here works perfectly, while the GIFs here and here do not work.

What is happening?

Here is the github repo of the garden, if needed.

Ps: Thanks again for this amazing plugin!

f-mc2 commented 9 months ago

I have some phenomenology on what is happening.

On the webpage with the working GIF, I right-clicked it and choose "open in a new tab". The result clearly shows the image loaded is the one I uploaded originally.

However, the same procedure on the not-working GIF leads me to a file which is not the one I uploaded, but it is an optimized version made by Netlify.

It seems that Netlify's optimization kicks in when a GIF is considered "heavy", and transforms it into a static webpm. However, it is not clear to me how it works. In one case, a GIF kept being optimized until I compressed it to less than 205 KiB. For another one, I only needed to compress it to 1.3 MiB.

It would be nice to understand clearly what is happening.