Is it possible to detect animated gif images client side?

前端 未结 2 1675
广开言路
广开言路 2020-12-03 07:36

Is it possible to detect animated gif images client side?

In Internet Explorer you can use the onload event for this, since it willl be fired for every

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 08:08

    I don't know of any way to do it on the client side, but I am not sure about that. What you could do, is parsing the HTML code and any referenced gif on the server side and add a class to these images. But that is not really recommended because it involves at least one additional parsing of HTML + parsing of every gif. As you can see from this example in PHP, checking the gifs is also not trivial in terms of CPU load.

提交回复
热议问题