📝 an important note
make sure to read to the end to understand when to use each method
UPDATE: There is no transparency on either of these GIFs on Medium, leading me to believe Medium renders animated GIFs different from other services. Upon downloading the images, they are again transparent and the expected quality and file size.
There are a few tuts on this, but they all gave me super grainy images. So I’m just going to let you know what worked for me and gave me clearer graphics, smaller file sizes, and it took way less effort.
First, you obviously need AfterEffects. Load it up and get whatever your asset is with the transparent back. You’ll need to toggle the transparency button in this step to make sure it exports without a background.
This next step is where other tutorials often send you down a rabbit hole of PNG sequence exports. We’re going to export as a .MOV, which I did find a few tutorials for. So you’ll simply do Composition > Add To Render Queue. You should see something like this:
Best settings is fine for your Render Settings. In the Output Module, you’ll want to start changing things. Go to Custom and set your channels to RGB + Alpha to preserve transparency.
We’ll take it one step further and under Format Options > Video Codec, we will select Apple ProRes 4444 XQ. If you don’t have that available, it’s fine to leave it at the default of Animation.
Okay, so going through all these steps, all tutorials want you to import into Photoshop, from my experience. That results in an image like the following for me:
This actually looks okay on white backgrounds, but it’s a bit grainy on darker backgrounds and the file size is a little too big. So instead, I just drag that .MOV file from earlier into Gifski, leave the default settings, and I’m left with a transparent .GIF that is a smaller file size and looks great on dark backgrounds and light backgrounds.
The file size difference is 4.6 MB for the first and 2.7 MB on the second. Ironically, the latter actually looks worse in Medium, but far better in almost all other mediums I’ve shared it, including Pitch, iMessage, Telegram, and in Finder across multiple devices. So if you find you’re getting grainy images and the file sizes are too large, consider giving this strategy a shot. It takes significantly less effort than the Photoshop route and will result in better imagery many places.
If you’re interested in how the Photoshop route works, here’s the tutorial that I found to be the most straightforward.