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. ๐
Thanks for this. I dont know why Giphy just doesn’t allow you to get a GIF file as need, instead they force another format. The command worked as expected.
You are the greatest man, thank you
Thank you!
OK, noob question, but is running a cURL command different than pasting into a browser? Instead of a download, I’m directed to search results on that address. (Tried three browsers and several default search engines) . Thanks!
Hi Joe โ Yes, running a cURL command is different than pasting into the browser. On a Mac, you’ll need to run this from the
Terminal
app, or some other similar program. If you’re on a PC, there should be an equivalent there as well, though I haven’t had a PC in a while.Awesome (or as Keanu would say it, “Whoa”) . https://media.giphy.com/media/daAsPFgZkW9iM/giphy.gif
Thanks!
Baller. Exactly what I wanted.
Hello how can I do this for Mac Os
Hello Tosin,
Open up the “Terminal” app, copy and paste the command above (being sure to replace the URL with that of the GIF that you want) into the “Terminal” app, then hit enter. Afterwards, the GIF should be available on your Desktop.
I right clicked on the Gif from Giphy > Save to (Google) Keep> Then from Keep, Right clicked gif then > Save. It default saves as .gif. I have a label created for GIFS in Keep. You can also do this for your Google Drive but may have to go through keep first. Of course you have to have the Google Keep Extension and chrome app. If you don’t have Keep, you should. BTW- Did this from PC Windows…. More than one way to skin a fish.
You rock!!!!!
Really appreciated, my man!!
Oh my god, thank you so much, that was clear and to the point, even for non-tech people ๐
๐ค๐ค๐๐ Dude! MUCH APPRECIATED!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0Warning: Failed to create the file ~/Desktop/download.gif: No such file or
Warning: directory
0 1201k 0 5484 0 0 5484 0 0:03:44 –:–:– 0:03:44 167k
curl: (23) Failed writing body (0 != 5484)
i got this only
I also got this message when trying to run the cmd prompt in Windows.
ALTERNATELY, RIGHT CLICK THE GIF AND CHOOSE SAVE IMAGE AS…… ******FACEPALM
Hi Eric, Thanks. I am on a Mac-book. What is a cURL and where do I find the “TERMINAL” that you refer to?
Just disable java script
Another hack seems to be if you replace the “https://media” in a link with “i,” you get a direct link to the gif that can be dragged to the desktop. For example, turn
https://media.giphy.com/media/vLruErVSYGx8s/giphy.gif
into
i.giphy.com/media/vLruErVSYGx8s/giphy.gif
Tally ho!
This is beautiful! Thanks for leaving a comment with the suggestion.
I’m having the same issue- the file is downloading as a web page when I right click on it. I tried your command and it downloaded a file that is a .gif, but when I open it, it opens in preview and just shows all the photos as layers. I tried in in photoshop as well and it did the same thing. Thanks for your help,
Instead of opening in preview, try opening in a browser like Chrome. This should play the gif file for you.
What a great piece of expert advice.
Key to the whole thing for Mac Users is this:
Open up the โTerminalโ app, copy and paste the command above (being sure to replace the URL with that of the GIF that you want) into the โTerminalโ app, then hit enter. Afterwards, the GIF should be available on your Desktop.
I had never come across Terminal before (in fact nore anything else in the utilities folder).
Thank you for the knowhow.
Thank you so much! It worked ๐
ยกGenial truco, gracias por compartir!