Search TekSocial
Stay Connected

Enter your email address:

(We respect your privacy!)

Or subscribe with your favorite RSS Reader

  

« Grooveshark | Main | Radiant Review »
8:07PM

How to Batch-Download Images from Tumblr

Tumblr logoTumblr is a great source of amazing photos, but downloading them one by one is impractical and tedious, especially when Tumblr users get creative (or crazy) with their page design and make navigation tiresome (or nearly impossible). This short guide will show you how to automatically download multiple images at once from any Tumblr page. All you need is your favorite terminal emulator application.

This method might be an overkill if you only want to save a couple of images, as you can always do that “by hand”. However, if you would like to grab many images at once – for example, from a Tumblr about your favorite TV show, actress or singer – this little shell script is probably the most efficient way to do it.

1. Getting the Code

First you will have to download the script to your computer – you can find it here. The credit for the script goes to its author, of course; I'm merely spreading the word about it. :)

Save the script by copying and pasting it into a file you will call, for example, tumblr.sh, and place it in your /home/[username] folder. Naturally, you can give it a different name, but it's essential that the file extension is sh.

2. Preparing the Prerequisites

If you take a look at the source code of the script, you will see that it utilizes curl – a command-line tool for transferring files from the Internet. This means that curl has to be installed on your computer before you can use this Tumblr download script. Don't worry – most Linux distributions have curl installed by default, so it's very likely the same in your case. If it isn't, you can find curl in the repositories of your distribution and install it easily from the package manager.

3. Setting the Permissions

Next, we need to make the script executable. Open your terminal application, navigate to your /home/[username] folder and type ls -la (that's a lowercase L in both cases). You will get a list of all files and subfolders in your home folder, including our Tumblr script.

To make it executable, type chmod +x tumblr.sh

You can run the ls -la command again, just to check if the permissions were applied correctly. The script should now be colored differently in the list (but this depends on your terminal application configuration).

4. Downloading Images

Now we can finally test the script. Make sure you're connected to the Internet and that you're still in your /home/[username] folder in the terminal application window. Type in the following:

./tumblr.sh [name of the tumblr page from which you want to download images] [number of pages to download]

Download photos from Tumblr

The first part of the command runs the script. The second and third parts “tell” the script which Tumblr URL to visit and how many pages it should grab images from. Note that you don't have to type the full address of the page here (http://iheartshakira.tumblr....) - it's enough to just enter the name of the Tumblr.

The script will automatically create a subfolder in the folder in which it was executed (in this case, your /home/[username] folder). And that's it! You are now free to browse and enjoy the downloaded images. :)

Downloaded photos folder

Bonus: A Time-Saving Tip

To avoid having to open the exact folder in which the script is located every time you want to use it, you can create an alias, or a “terminal shortcut” for it. Open the .bashrc file which is in your /home/[username] folder and type the following at the end of the file:

alias tum='/home/[username]/tumblr.sh'

Instead of “tum”, you can write any name which you find handy, and if you placed the Tumblr script into some other directory, just write that path instead of this one. (Some users like to create a /bin subfolder in their /home/[username] folder to keep all their shell scripts in one place, so you can do that, too, if you prefer that kind of file organization).

To make your system acknowledge the new alias, type source /home/[username]/.bashrc in your terminal application and press Enter. Now you can run the Tumblr download script from anywhere simply by writing: 

tum [name of the tumblr page] [number of pages]

and the script will make its own subfolder there.

 

If you're not a Linux user or if you prefer graphical interfaces to the old-fashioned but powerful CLI, don't despair - you can use browser addons or download managers to get images from Tumblr. Still, this script is much cleaner and faster than installing a new piece of software and going through its learning curve, so I think you should give it a shot.

 

 

 

Ivana Isadora Devcic is a freelance writer, copyeditor and translator fluent in English, Swedish, Croatian and Norwegian. She's a Linux user and KDE fan interested in web design, productivity and personal branding. Ivana tweets about the world around her as @skadinna.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>