Julie Sheffield
Julie Sheffield

Reputation: 155

Is there a way to show animated gif in Safari Mobile on Android?

I have a web application, not a native Android app, and the animated gif we use as a loading icon doesn't show its animation. I've browsed other sites and it seems that no animated gifs work in Safari mobile on Android, but I've been unable to find a documented confirmation that this is the case. Does anyone know why the android browser doesn't show animated gifs? Is there a workaround for this? I've seen lots of topics about showing animation in a WebView in a native app, but none for straight web apps. Do I have to create the image with css animation?

Thanks very much!

Upvotes: 2

Views: 4979

Answers (2)

quelquecosa
quelquecosa

Reputation: 910

After running tests with a project I'm working on, I can say that:

  • gifs display beautifully on iOS devices (I'm testing on an iPhone4 running iOS6 and gifs run smoothly. I have tested on newer devices as well...it only gets better!)
  • gifs display pretty badly on android (I'm testing on Galaxy S3 running android 4.1). Its even better to display a flat image, the gif animation lags a lot).

Upvotes: 1

Chris Stratton
Chris Stratton

Reputation: 40397

Android uses webkit which is the underlying engine from Safari, not Safari itself.

Historically it has not supported animated GIFs due to the way the graphics are composited, however they can be optionally enabled by the user under the advanced settings of the browser on some more recent devices. That probably does not make them useful to you.

For wide compatibility with various android versions you would probably be better off with a javascript or css animation (not sure if the later works all the way back through the earliest releases).

Upvotes: 2

Related Questions