N
N
Nikolai2020-04-22 22:53:59
css
Nikolai, 2020-04-22 22:53:59

How to properly display gif on the page?

Friends, such a question. I display several gifs on the page, but due to the fact that the files are too large, the page takes too long to load. I tried to display webm instead of gif by converting the files, but nothing worked for me. It's not possible to compress gif, because 1. The files still turn out to be large, 2. GIF files become too bad quality. Please tell me how can I solve this issue?
5ea0a0f6c75b7275045691.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Oleg, 2020-04-22
@politon

If the animations are simple, you can redo it through the canvas,
or even css animation is enough

A
Arseny, 2020-04-23
Matytsyn @ArsenyMatytsyn

Stop downloading them. The approach is called lazyload.
But if there are a lot of them directly, then do the loading, say, by hovering over the element. A la dribbble.
In both cases, you will need to arrange a placeholder, and in the second case, you will also need to make jpg-pictures for display before hover.

A
alakifi, 2020-04-24
@alakifi

Use lazy loading

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question