GIF doesn't do the full loop

Hi,
I am trying to use a GIF as an image and i have noticed that Glide cuts the gif full duration.

I tried to use a GIF with a countdown like this one and in Glide it gets cut at 7 seconds and goes back to the beginning. I tried storing the file directly in Glide and storing it in firebase. The problem persists.

Does anyone knows why this happens and if there is a way for the gif to do the full cycle?

When I inspect the GIF I uploaded to the app after it is published i noticed that the GIF effectively used is a compressed form and that all the GIF’s are cut at 7140 milliseconds.

I understand the compression but the cut part doesn’t make much sense and turns unusable longer GIFs. Is there anyway to use GIF’s that are not cut at 7140 milliseconds? @david @Mark

Try referencing the image directly with html img tags in a rich text component.

3 Likes

Ok, that works. So all the image size and position has to be done in HTML in this case. I also tried using a giphy as a link and that one isnt’t cut (although firebase is)

1 Like

Glide aggressively caches and compresses images to show the most optimized version for quick loading depending on the OS/Browser, and which screen view or components you are using. Maybe giphy works because glide can’t directly cache and compress it. I suppose the same happens with GIF images, but by using the img tags, the browser is making direct requests for the full uncompressed image version.

2 Likes

And is it possible to use Lottie files direclty in HTML (not exporting a GIF)?
Like this one Lottie Web Player - Lottiefiles

Not sure. Not familiar with them, but looking over the site quickly, it may require a web view or a third party site with the necessary code to play a Lottie file and is displayed in a web view.

2 Likes