How to download a gif from Giphy

Recently, when I was trying to download a gif file from Giphy, I noticed that when I went directly to the file, https://media.giphy.com/media/14kdiJUblbWBXy/giphy.gif for example, that it was actually loading a web page instead of the gif file. 😞

I figured that they were probably detecting that based on who/where the request was coming from, so I tried downloading the gif file by running a cURL command:

curl https://media.giphy.com/media/KXgJsSeOfvSgg/giphy.gif --output ~/Desktop/download.gif

This resulted in the actual gif file that I wanted being placed on my Desktop as download.gif. 💪

If you landed here, then hopefully you’ll find this little workaround helpful. 😄