Why download your Photobucket images?
Earlier this year, Photobucket changed their Terms and Conditions fairly silently, to prevent linking of images on their service on 3rd party websites for free. Instead, users who had posted Photobucket links to their images on another website saw this ugly prompt to upgrade their account.
Photobucket had already done this for users when they reached a very high bandwidth usage, but previously an upgrade was only $25. Now the ability to hotlink your images from Photobucket comes with a steep $400/year price tag. Many users called it extortion and blackmail. Especially because users soon discovered the interface to download their images to then post them from their own website was broken. And, the option to upload an image in a support ticket with Photobucket was broken too. This left many users in a panic. There simply was no way to get their site working again.
Luckily, if you’re familiar with Terminal and Bash, there’s a pretty easy way to get your images back. Philip Jewell posted helpful steps on Github as well as images to help guide the way.
Get the Image Links
First, log into your Photobucket account and select the album of images you need (this process goes one album at a time). Choose an image or two in the album and a “Select all” box appears. Choose “Select all” and wait for your count of images in the bottom to update before continuing. Now navigate to the next album you’d like to download and repeat the process. Do this for all albums you need to download. Through this process your total images selected should continue to grow. When you’re finished, click “Link” at the bottom of your screen.
Photobucket will open a window containing all the direct links for your images in it. Clicking will copy the links to your clipboard.
From here, create a folder on your desktop called “photobucket.” Then open a text editor on your computer and paste your image links into it. Save it as a TXT file (e.g. my_photobucket_files.txt) to your “photobucket” folder on your desktop.
Now you are ready to download the files.
Please note: the following instructions are for users on Mac OS X. If you are using a Windows machine, users have provided solutions in the comments of Philip Jewell’s post on Github: https://gist.github.com/philipjewell/a9e1eae2d999a2529a08c15b06deb13d
Download your images
Now the fun part: downloading your images from Photobucket. In your Terminal application, paste the following commands:
cd ~/Desktop/photobucket
cut -d\/ -f 7 photobucket_files.txt | grep "\." | while read file; do grep "${file}$" photobucket_files.txt; done | while read file; do curl -O --referer "http://s.photobucket.com/" ${file}; done
cut -d\/ -f 7 photobucket_files.txt | grep -v "\." | sort -u | while read dir; do mkdir ${dir}; cd ${dir}; grep "/${dir}/" ../photobucket_files.txt | while read file; do curl -O --referer "http://s.photobucket.com/" ${file}; done; cd -; done
What is this command doing? It’s looping through all your images to download them, and using “http://s.photobucket.com/” as a referer. This tricks Photobucket into thinking the requests are coming from itself. This allows you to easily download your images you need without dealing with their buggy and ad-ridden interface, or dealing with their upgrade messaging.
Some users have also suggested using sed to take out IMG tags as well:
sed -i 's/\[IMG]//g; s/\[\/IMG]//g' photobucket_files.txt
That’s all there is to it! Hopefully this guide has helped you download your images so they can be uploaded directly to your site, store, forum, or wherever they were needed. Have any comments, questions, or notes to add? Let me know in the comments, or Contact Me.
Kathleen T says
Thanks so much for providing this info!
I was so annoyed that I had almost 1000 photos of my kids on photobucket which I could no longer dowload all at once (and after moving I’m finding it difficult to find the original digital copies, and the photobukcet folder I had previously downloaded). Really pissed off and disgusted by photobucket, even more than before!
My notes to help others are:
1) It took me awhile to realise the above info applies to linux, not windows. Luckily my husband has a laptop with linux on it, as, unsurprisingly, a lot of the commands are totally different and it kept not recognising them on my laptop. Not sure what windows users can do to download the photos?
2) When I had tried to copy and paste the direct link on my laptop it didn’t work so I just typed out the address URL, which of course doesn’t work! When we did it on my husband’s laptop it actually did let us copy the direct link and we noticed every image file was pasted into the text file, not just a URL! Success!
3) As most linux users probably already know, you can just name a linux file as .txt which worked for us.
4) In the instructions it gave an example file name of “my_photobucket_files.txt” for the text document, but in the command it is simply written as “photobucket_files.txt”.
I had just been following everything religiously because I don’t really know what I’m doing. Luckily my husband noticed this and once we corrected it, it started madly downloading!
It’s taking awhile but looks promising. Will write again if it doesn’t work. Thanks again!
RaceFPV says
Still works great! If you hit an error with ‘illegal characters in URL’ try running the .txt file through dos2unix which will fix it up
Martine says
Hi Janna,
thanks for providing help with this, it is much appreciated!
I ran into an issue with cmder: The system cannot find the path specified.
‘while’ is not recognized as an internal or external command,
operable program or batch file.
How should I resolve this?
Thanks so much for your help.
All the best,
Floyd Jennings says
I received an error message that “cut ‘ is not recognized as an internal or external command (in Windows).
vee says
Hi! I followed these steps exactly on my Windows 10 laptop, and it didn’t work =(
Is there anything else I can try?
Just Someone says
Hopeing thi still works in Sept 2019. I have a proboards forum for like 15 years now and my co-admin just let me know that all the images are gone from the themes! I knew photobucket was the culprit, this happened once before about 10 years ago maybe.
I stopped using photobucket when they started charging $25/year. There is no reason to pay for hosting pics. I will update afterward to let future visitors know if this works or not.
Daniel says
What “terminal”? cmd.exe doe not have a “Cut”.
What terminal program can be downloaded to execute the script?
Ron says
Hello,
I took the above steps and it did not download the photos…does this still work?
Erika says
Can you break down the “In your Terminal application, paste the following commands:” step a little for those like me who are not quite tech savvy to know what a Terminal application is, where to find it, and how to use it? I would very much like to get my photos back that are being held captive. Thanks a bunch!
Dave Rifkin says
I am not very tech savvy can someone tell me what a “text editor” is? I also need to know what my “Terminal Application” is.
I am sick of Photobucket and want to use this process to get my photos from that site but, I am not 100% clear on the steps outlined; sorry.