V
V
vdorokhin892021-02-24 10:37:05
Nginx
vdorokhin89, 2021-02-24 10:37:05

Display gif animation. Why does not it work?

An index.html page is created, in which there is only one line with an inserted gif animation in the img tag (in the simplest version). I open it in the browser by double clicking directly and see the expected result, that is, there is animation on the page. However, if I go to the same html document through the address bar (to the same folder? only through the local OpenServer server), then this animation is not there at all. Even the icon that the browser puts when the path to the image is incorrect is not shown.
The hosting is the same. by direct link to the GIF, it opens, but if you insert it as a picture into the page, then there is no trace of it at all.
I searched on Google, although many times I met such a problem with people, but I did not find a solution to it. Maybe the server somehow handles gifs in a special way, or something else. With jpg, or png everything works of course

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vdorokhin89, 2021-02-24
@vdorokhin89

The comments helped. Everything turned out to be simple and stupid. Gif deleted by adblock

D
Dmitry Zhemchuzhnov, 2021-02-24
@alphaDzhem

Good afternoon.
It would be nice to see the code. How are the paths to the image defined, what classes are used?

K
ky0, 2021-02-24
@ky0

The web server returns the wrong MIME type , it seems - that's why the browser does not perceive the picture as a gif.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question