In the past when I wanted to loop an After effects Composition I always do duplicate the composition multiple times, until this day where I had a this tiny composition to duplicate a hundred time!! After a few research online I wanted to share to simplest way to loop an after effects composition / precomp, so here it is.

Shot 1 – Place the composition you would like to loop in the new composition

After effect Pre Composition

Shot2 – Right Click on the Composition Layer – Click Enable Time Remapping

enable-time-remapping

Shot 3 – Once time mapping enable this is what you should see
composition-remapping

Shot 4 – Add a script to the time remap
On PC : Hold Alt + Click on Stop watch
On Mac: Option-click stopwatch

Replace timeRemap by this loop expression: loopOut("cycle")

loop-composition

Shot 5- This is where the magic happen! -Click at the end of your composition, drag until the end or where ever you want it.
extend-composition

Click play – Now your After Effects Composition Layer should play in loop!

One thing you should know
Sometime the last key frame of the time remap is blank, you can edit the frame rate of your main composition and it should resolve it.

Good Luck!