You can swing your arms around as much as you like, but if you swing them into someone's face, that's illegal. As someone posted above, you can make food with peanuts as much as you'd like, but if you sneak peanuts into someone's meal who you know is allergic to peanuts, that's illegal.
Tweeting gifs? Fine. Tweeting gifs at someone with the intent to cause harm? Illegal
Not at all. Unless you tag it with a person you know vulnerable to seizures, and then on top of that, brag about it.