Method 1 – Export a sequence of images.
This is the method I always use from After Effects. It is a bit tedious, but it always works 100% and you will have much more control over your animated GIF.
Render your After Effects composition in Image sequence.
Drag and drop your master composition in the Render Queue window
Step 2: Edit and Setup Render Queue Settings
In the Render Queue Window, Click On Best Settings blue link
In the frame rate area, check use this frame rate
Change the number to 10 (if you need your gif animation super smooth, then increase the number)
In the Render Queue Window, Click on Lossless
Change Format to PNG Sequence
If you need your animated gif to have a transparent background: Next to Channels select RGB+Alpha
Also, your AE composition might be too big for a GIF. Check resize and edit the width and height.
In the Render Queue Window, choose the folder location where you’d like to put the image sequence.
Now Open Photoshop
To import a series of images in photoshop click on File > Scripts > Load Files Into Stack…
Click on Browse, and select all the images you need for your GIF
Once you have done that, click OK. Photoshop will create a layer for each image.
Click on Windows > Timeline
Click on the Create Video Timeline button
Now we need to add all the layers to the photoshop timeline,
Click on the timeline menu icon
Select Make Frames from Layers.
Now you should see all the image frames appear in the timeline. The only issue is that the frames are backwards. To reverse the frame order,
Click on the photoshop timeline menu icon again
Select Reverse Frames
By default photoshop adds 5 seconds to one frame. Just click on the “down arrow” and change it to the time you need (Watch demo below)
Now we are ready to export our animation from Photoshop to a single animated gif file.
Open the Save for Web window and on your keyboard press:
Windows: ctrl + alt + shift + s
Mac: cmd + opt + shift + s
To make your animated gif loop and play indefinitely, don’t forget to select Forever on the save for web window.