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 frame loaded (behaviour changed in IE8).
But is there a way for other browsers too?
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 frame loaded (behaviour changed in IE8).
But is there a way for other browsers too?
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.