# Create GIF looping animation

I created the GIF animation with the plot of a sinusoidal wave moving towards the LHS of the image, suggested here.

gif = Table[Plot[Sin[a + x], {x, 0, 10}], {a, 0, 10, 0.1}];
Export["sinSmooth.gif", gif]


After showing all the correct motion, the GIF stops. Most of the GIFs created in this site don't, instead.

In the same link it is suggested how to let the animation go backwards after reaching the end:

gif = Table[Plot[Sin[a + x], {x, 0, 10}], {a, 0, 10, 0.1}];
Export["sinSmoother.gif",Flatten[{gif, Table[gif[[i]], {i, Length[gif] - 1, 2, -1}]}]]


But anyway, after completing one or two cycles (depending on the image viewer used), even this way it stops.

What about creating a continuous loop?

Is there an option (in the Plot, Block or Export function) which can make the GIF continuously being reproduced, regardless of the image viewer?

• please paste your code or show a minimal example ! – Ali Hashmi May 8 '17 at 16:05
• @AliHashmi I just made as you suggested. – BowPark May 8 '17 at 16:11

As partly mentioned in this: Add delay to the final frame of a GIF? we can use "AnimationRepetitions" -> ∞ to loop a GIF indefinitely:
Export["C:\\Users\\Ali Hashmi\\Desktop\\test.gif", gif, "AnimationRepetitions" -> ∞]