I want to embed a gif image into my app. The gif animation works on a browser. However, it does not play when I pushed it onto my iPhone. Is this the default behavior?
The path should be correct. I had the image displayed on the iPhone correctly. The only problem is that it doesn’t play unlike the build I have for android or browser
@AshConnell I am using safari for debugging and its is pulling my image successfully. No issues with the path file.
@mhartington The image is local. You got me curious when you say that it worked in slidebox. So i went out to experiment and turn out it does works if you put it in the first slide (My app requires it to be on the last slide) – Thanks for pointing this out for me . Another discovery was it would work on subsequent slides if on every slide there was a gif image. Otherwise, all gif images will stop playing when scrolled to the particular slide.
I have noticed that I am unable to get an animated gif to play on iOS when using a local file. It works fine when it is a remote file like the example here.
I circumvented this bug by putting on every slide (or until the one you want the gif to be playing in) a copy of the gif image with 1px width and height (setting width and height to 0px won’t work).
It’s not the most elegant solution one would hope for because gifs will already be mid-animation when changing slides but at least it works in some way!
I have the same issue, appears to be a rendering issue with our iOS8 device. I have a group of slides which have a different GIF on each slide inside an ionicModal. All of the GIFs pause their animation when you do the first swipe transition, could be to do with hardware acceleration?
EDIT: Following GNSPS’s fix, that seemed to work for me! I ended up creating a couple of img tags just before the slider container element and made them 1x1 so they were being rendered on-screen but also not visible.