BUY THIS BOOK
Add to Cart

Print Book $24.99


Add to Cart

Print+PDF $32.49

Add to Cart

PDF $19.99

Safari Books Online

What is this?

Add to UK Cart

Print Book £17.50

What is this?

Looking to Reprint or License this content?


Flickr Hacks
Flickr Hacks Tips & Tools for Sharing Photos Online By Paul Bausch, Jim Bumgardner
February 2006
Pages: 364

Cover | Table of Contents


Table of Contents

Chapter 1: Sharing Photos
Sharing photos has been a popular activity since the invention of the portable camera. Most of us regularly pore over photos during gatherings with friends and family, whether flipping through a stack of photos, looking through albums, or enduring projected slideshows chronicling every detail of a recent vacation. Flickr helps you share photos in many similar ways [Hack #1] , and it gives you control over who sees which photos [Hack #2] .
Now, instead of waiting for a gathering to share your photos, you can make them available to your friends and family almost as soon as you take them [Hack #6] . You can even add the photos to your own web site [Hack #9] if you want. And in addition to friends and family, Flickr can connect your photos with a wider audience of people who might be interested in them. Sharing photos is nothing new, but Flickr gives you the opportunity to share your photos in new ways.
To get started sharing photos with Flickr, you just need a minute or two to create your account. Browse to Flickr (http://www.flickr.com), and click the "Sign up now!" button shown in Figure 1-1.
Figure 1-1: The Flickr front page
Flickr is owned by Yahoo!, and if you already have a Yahoo! account, you can use your Yahoo! ID and password to create a new Flickr account. If you don't have a Yahoo! ID yet, clicking the "Sign up now!" link will walk you through the account creation process. The whole process takes less than a few minutes, and once your Flickr account is created, you can start sharing photos.
When you return to Flickr in the future, you can click the "Sign in" link at the top of the Flickr front page. From there, you'll see the two sign-in options shown in Figure 1-2.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Hacks 1-9
Sharing photos has been a popular activity since the invention of the portable camera. Most of us regularly pore over photos during gatherings with friends and family, whether flipping through a stack of photos, looking through albums, or enduring projected slideshows chronicling every detail of a recent vacation. Flickr helps you share photos in many similar ways [Hack #1] , and it gives you control over who sees which photos [Hack #2] .
Now, instead of waiting for a gathering to share your photos, you can make them available to your friends and family almost as soon as you take them [Hack #6] . You can even add the photos to your own web site [Hack #9] if you want. And in addition to friends and family, Flickr can connect your photos with a wider audience of people who might be interested in them. Sharing photos is nothing new, but Flickr gives you the opportunity to share your photos in new ways.
To get started sharing photos with Flickr, you just need a minute or two to create your account. Browse to Flickr (http://www.flickr.com), and click the "Sign up now!" button shown in Figure 1-1.
Figure 1-1: The Flickr front page
Flickr is owned by Yahoo!, and if you already have a Yahoo! account, you can use your Yahoo! ID and password to create a new Flickr account. If you don't have a Yahoo! ID yet, clicking the "Sign up now!" link will walk you through the account creation process. The whole process takes less than a few minutes, and once your Flickr account is created, you can start sharing photos.
When you return to Flickr in the future, you can click the "Sign in" link at the top of the Flickr front page. From there, you'll see the two sign-in options shown in Figure 1-2.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Store, Sort, and Share Your Photos
To get started with Flickr, you need to understand its basic features.
At its most basic, Flickr is a web application that helps you create a public journal of photos. You can upload your photos to Flickr and see them appear on a web page, with the most recently added photo on top. But once you start playing with Flickr, you'll quickly find that it's much more sophisticated. In fact, Flickr is an open platform for storing, arranging, sharing, discussing, and discovering photos with people across the globe.
What began as an independent project by a small company called Ludicorp was quickly snapped up by Yahoo! and is now reaching a much wider audience. If you don't already have a Yahoo! account, you can sign up for one via the Flickr home page.
A basic Flickr account is free and lets you upload up to 20 MB of photos per month, show up to 200 of your photos, and create three individual galleries (which Flickr calls sets). You can also upgrade to a paid Flickr Pro account, which gives you much more storage and unlimited sets. At the time of this writing, a Flickr Pro account costs $24.95 per year.
Once you've created an account, you can add some information about yourself to your profile that will tell others a bit about you. Flickr is a social application, and unlike some sites where uploading photos feels like a lonely process, adding photos to Flickr feels like a group activity.
The first step in getting to know Flickr is uploading some of your photos. The steps required to move photos from your camera to your computer vary widely, so that will have to be an exercise for the reader. But once the photos are on your computer, there are several ways to add them to Flickr.

Section : From your browser

When you're getting started, the simplest way to upload photos is via your web browser and the "Upload photos to Flickr" page (http://www.flickr.com/photos/upload/). Click Browse... next to one of the blank fields on the page, and a new window will let you choose an image file on your local computer. Figure 1-3 shows what choosing a file looks like on Windows XP.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Control Who Sees Your Photos
Flickr has a flexible privacy system that enables you to share photos with your friends, your family, or the world—or keep them to yourself.
Flickr exists so that you can share photos, but you might not want everyone in the world to see all of your photos. Your friends would love to see photos of you knocking back a few beers at your favorite bar, but your boss might frown on them. Your family would love to see photos of you dressed up for your cousin's wedding, but your friends might not appreciate your powder-blue tuxedo. With a bit of planning, you can make sure that your Flickr photos are shared with only the people whom you want to see them (or not shared at all).
Every photo sent to Flickr has a privacy setting, and the default setting is Public. When a photo is Public, anyone visiting Flickr can see the photo. If you want to control access to your photos more closely, you can set them as Private. But the term "Private" is a bit misleading, because there are different levels of privacy. To understand how the levels of privacy work, you need to know a bit about how Flickr contacts work.
When you mark a photo as Private, the ability to view the photo is limited to you (of course) and certain people among your Flickr contacts. Say you want to share a slightly embarrassing baby picture of yourself with members of your family, but not the rest of the world. First, you'll need to add your family members to your contact list by inviting them to join Flickr (or, if they already have accounts, browsing to their photostream pages and adding them as contacts).
To invite people, browse to your Flickr home page and click the Invite link at the top of the page. Enter your family members' email addresses and names, and designate their relation to you by checking the box next to "This person is family." Click Send, and Flickr will send out invitations. Once a family member receives the invitation, she can register at Flickr, and she'll be added to your contact list as a family member.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Manage Image Metadata
Flickr will display the information that most digital cameras embed inside a photo, and with the right tools, you can control this data.
If you take photos with a digital camera, chances are good that the original files that come from the camera contain information about the camera settings when you snapped the photos. This information can include the date and time, how long the shutter was open, the settings you chose for the shot, and whether your lens was zoomed in or out. This type of information is called metadata, which literally means data about data.
In the days before digital cameras, one of the best ways to store information about a photo was by flipping over a print and physically writing on it. In the digital world, information about a photo can be embedded within the image file itself. Viewing the info can help you remember how you got a great shot, or tell others how they can achieve a similar effect.
If metadata is present in your photo when you upload it to Flickr, you'll find your camera make and model along with a "More properties" link on the photo detail page, as shown in Figure 1-15.
Figure 1-15: The "More properties" link on a photo detail page
Clicking the "More properties" link takes you to a page like the one in Figure 1-16, with many more details about the photograph.
Figure 1-16: "More properties" page on Flickr
As you can see, Flickr has chosen to highlight certain properties and include others in a grey box. All of this data that Flickr can display comes from a few different sources, and it helps to be familiar with some of the terms before you start editing and refining your photo metadata. The exact metadata will differ by camera and software, but here's a look at some common metadata properties you'll find:
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Resize Photos for Flickr
Images coming directly from a digital camera or scanner are often quite large. Resizing them before sharing them can save your Flickr bandwidth.
Digital photos come in all shapes and sizes, because they're taken by devices with varying capabilities and used for a number of different purposes. If you're going to print a digital photo, you want the highest resolution possible—the more pixels there are in a photo, the better the print quality will be when translating that photo to paper. If you're just going to display an image on a computer screen, on the other hand, you can use a smaller image, because the screen doesn't need as many pixels to display a sharp image. Because Flickr images are primarily used for display on computer screens, you can take advantage of that fact and tailor your images just for Flickr by resizing them.
When you're using Flickr, you don't need to think about the size of an image. However, there are several reasons why you should keep image size in mind. Possibly the most important reason is conserving bandwidth. The free version of Flickr allows 20 megabytes of transfer each month, and larger image dimensions usually mean a larger file (in megabytes) to upload. It takes longer to upload larger photos, and you can upload fewer photos per month at the large size.
If you don't pay attention to your bandwidth you might not ever know you're uploading extremely large images, because Flickr automatically resizes them to a number of different standard sizes. For example, all photos in your photostream will be displayed at a maximum of 240 pixels wide (or high, depending on their orientation), allowing people to view many of your photos at once. Each image is displayed at a maximum of 500 pixels at the longest dimension on its detail page, so that viewers can see a bit more detail than was available in the photostream listing. In fact, if you upload a photo that's 1,000 pixels wide, no viewers will see it at its full size unless they click the All Sizes button on the photo detail page.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Add Photos Quickly
Flickr uploading tools can speed up the process of adding photos to Flickr.
Adding a photo to Flickr isn't hard. If you browse to Flickr, log in, and choose Upload from the menu, you'll find the upload page [Hack #1] , with six empty fields waiting for photos. Click the Browse... buttons next to the fields and choose some local files, and your photos will soon make their way from your desktop to Flickr.
If you want to add more than six photos at a time, though, the upload page begins to look like an awfully slow way of transferring files. You have to upload in batches of six, and wait for each group to transfer before starting the next group. Uploading 30 photos would require 5 trips to the upload page, and constant monitoring to find out when the last batch of photos was done transferring.
Another factor to consider when uploading photos is the size of the photos themselves. A larger image file will take longer to transfer, so you might want to resize your photos [Hack #4] before adding them to Flickr.
Luckily, Flickr has provided several tools to make uploading easier. An uploading tool is simply a program you can install on your computer that communicates with Flickr. You can find a list of uploading tools created by Flickr developers at http://www.flickr.com/tools/, along with some tools written by outside developers. This hack discusses how to use some of the available Flickr upload tools.
Any tool that uses the Flickr API to add photos to your photostream needs your explicit permission. As you install software that communicates with Flickr, you'll likely encounter a Flickr permissions page like the one shown in Figure 1-26.
Figure 1-26: The Flickr permissions page
This process ensures that you give access only to programs that you're aware of, and you can view a list of the applications you've approved at any time by logging into Flickr and browsing to the Authentication List page (
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Post Pictures from Your Cell Phone
Using Flickr's post via email feature, you can send photos directly from your cell phone while you're out and about.
Imagine you're out walking around your city, and you notice that the annual fair is setting up for its week-long extravaganza. You'd like to share the news with your friends and family. You could take a picture of the newly unloaded carousel with your digital camera, walk home, transfer the photo to your computer, and then upload it to Flickr. If you have a cell phone with a built-in camera, however, you can take the picture and post it to Flickr on the spot. Hooray for convergence!
To post from your cell phone, you'll need a cellular plan that lets you send photos via email. The data-transfer plans are usually $5 to $10 more per month than standard plans, or you might have a pay-per-use option that lets you pay for the number of messages you send. Check with your cellular service provider to get details about sending email from your phone. Once your plan is in place, posting from your cell phone relies on Flickr's "Upload-by-email" feature. Most camera phones can send any of their photos via email. With the proper phone and plan, you simply need a Flickr email address.
Every user at Flickr has a unique email address for uploading pictures. You can find out yours by looking under Your Account at the bottom of any Flickr page and clicking the appropriately titled "Upload-by-email" link. You'll see a page like the one in Figure 1-34, which lets you in on your secret address.
Figure 1-34: A Flickr email address
Notice that the email address is made up of random words and numbers before the @ symbol, followed by photos.flickr.com. Keep in mind that the domain is not simply flickr.com, because without the photos. prefix, your photos will be sent into the void.
The "Uploading by email" page also lets you specify any tags to automatically add to a photo when it's uploaded via email. Popular tags for cell phone users include
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Feed Your Latest Photos to Your Web Site
Flickr provides a number of ways to syndicate your photos to another web site.
Adding photos to an existing web site can be a complex chore. You have to upload each photo to your site, write some HTML to display each photo on a page, and create duplicate, resized images if you want to show thumbnails of the photos. Fortunately, there are several tools at your disposal that simplify the process of sharing your photos on a remote web site.
Even though you upload your photographs to Flickr—and they're stored on Flickr's servers—your photos aren't locked in at the site. Flickr is an open system that allows you to access your photos in a number of ways and display them anywhere you'd like. One of the easiest ways to show your photos on another site is with a Flickr badge.
Though it sounds like something you might wear on your uniform, a Flickr badge is simply a bit of code that displays photos on a remote web site. Figure 1-40 shows a simple Flickr badge with three photos on a remote web site.
Figure 1-40: A Flickr badge on a remote site
You can create your own Flickr badge in a simple five-step process. Browse to the "Create your own Flickr badge" page (http://www.flickr.com/badge_new.gne), and log in if you haven't already. Creating a Flickr badge is the process of making a number of decisions about the badge. Here are the steps:
Choose the type
You can decide between basic static HTML, or an animated Flash-based badge. The animated badge shows a bit of movement and fades thumbnails in and out. Choosing Flash will mean your visitors will need the Macromedia Flash plug-in installed for their browsers in order to see your photos.
Choose the photos
You can choose to display your latest photos, or any of your photos that are tagged with a specific term. In addition, you can display photos from a group you're a member of, all Public photos with a certain tag, or, if you're feeling generous, all Public photos.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Make a Photo Gallery in 30 Seconds or Less
This online form will create ready-to-paste HTML code for your next photo gallery.
There are a number of tools available for building galleries or albums from your Flickr photos. One of my favorite free tools is CK's Flickr Album Maker, which can be found at http://webdev.yuan.cc.
CK is a Taiwanese Flickr Hackr who has made an excellent collection of code generators, most of them driven by forms.
CK's Flickr Album Maker presents an online form in which you're requested to fill out a few fields. It then produces either a static gallery of your photos, or a slideshow. In both cases CK provides you with the HTML code, so you can copy it and paste it into your own web site.
Since CK's code talks to the Flickr API to get information about your photos, you don't need to actually know anything about the API yourself. All of that stuff happens under the hood.
To begin making an album, go to CK's site at http://webdev.yuan.cc and click on the Flickr Album Maker navigation link. You'll be presented with the form shown in Figure 1-42.
Figure 1-42: CK's Flickr Album Maker
After filling out the form with the personal information needed to access your Flickr photos, press the submit button. CK's Album Maker will then produce a sample album and provide you with the HTML source code for copying, as shown in Figure 1-43.
Figure 1-43: CK's Album Maker-the result
If you want to tweak the result, you can modify the embedded stylesheet.
If you select the Slideshow option at the top of CK's form, it will produce source code for a very spiffy interactive slideshow, instead of a static gallery. The slideshow will look something like Figure 1-44.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Post Photos to Your Blog
If you take a few minutes to enter some information about your weblog at Flickr, you can post photos directly to it with a single click.
Many weblog systems offer tools to help you upload and include images with your posts, bit you might find that Flickr is a nice alternative to the standard photo tools. Once you upload a photo to Flickr [Hack #1] , you have several options for including that photo in your weblog posts.
The most direct way to send a photo from Flickr to your weblog is through the Blog This button that you'll see above each of your photos, as shown in Figure 1-45.
Figure 1-45: The Blog This button above a photo at Flickr
To enable the Blog This button, you need to give Flickr some information about your weblog.

Section : Configuring a weblog

Setting up Flickr to post to a weblog is a simple three-step process. Click Your Account at the top of any page at Flickr, and click Your Blogs under the section labeled Blogging. You'll find a list of any weblogs you've set up; to add a weblog to your account, click "Set up a new blog."
The first step to setting up a new weblog is telling Flickr which weblog tool you use. Flickr supports the following weblog systems:
Blogger
http://www.blogger.com
TypePad
http://www.sixapart.com/typepad/
Movable Type
http://www.sixapart.com/movabletype/
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: Tagging Photos
Before web applications borrowed the term tags to mean keywords about pieces of digital information, we thought of tags as something you added to a product to give a bit more information. For example, you might add a sale tag to a shirt to let everyone know its new price.
Photo tagging isn't much different, in the sense that you're adding keywords to a photo to let everyone know a little more about that photo (and to provide terms that people can search for to find photos of specific subjects). You can think of tagging as a way of describing your photos [Hack #10] for a larger audience, while organizing them for your own use.
Imagine you have a picture of a shirt, and you'd like to be able to find that picture in the future. If you add a few tags to the photo, such as shirt, clothes, or fashion, when you want to see that picture in the future you can simply browse your tags and view all of your photos tagged with shirt as a separate collection of photos. Also, anyone else interested in pictures of shirts will be able to see your photo as part of the larger, global collection of photos tagged with shirt.
Flickr was one of the first applications on the Web to allow tagging of content, and Flickr members have come up with many ways to use tagging to their advantage. Some have created alternate interfaces and games [Hack #11] for browsing global tag collections. Others have found a way to use tags to indicate the location a photo was taken [Hack #12] . You can also use Flickr's tags to create your own visualizations of how people are using tags [Hack #14] .
Whether you're tagging photos for personal organization or to take part in the larger Flickrverse, you'll find you can improve the way you tag by seeing how others are using tags to create new spaces for sharing photos.
Taking some time to think about how you describe your photos on Flickr might help you find a wider audience for your pictures
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Hacks 10-14
Before web applications borrowed the term tags to mean keywords about pieces of digital information, we thought of tags as something you added to a product to give a bit more information. For example, you might add a sale tag to a shirt to let everyone know its new price.
Photo tagging isn't much different, in the sense that you're adding keywords to a photo to let everyone know a little more about that photo (and to provide terms that people can search for to find photos of specific subjects). You can think of tagging as a way of describing your photos [Hack #10] for a larger audience, while organizing them for your own use.
Imagine you have a picture of a shirt, and you'd like to be able to find that picture in the future. If you add a few tags to the photo, such as shirt, clothes, or fashion, when you want to see that picture in the future you can simply browse your tags and view all of your photos tagged with shirt as a separate collection of photos. Also, anyone else interested in pictures of shirts will be able to see your photo as part of the larger, global collection of photos tagged with shirt.
Flickr was one of the first applications on the Web to allow tagging of content, and Flickr members have come up with many ways to use tagging to their advantage. Some have created alternate interfaces and games [Hack #11] for browsing global tag collections. Others have found a way to use tags to indicate the location a photo was taken [Hack #12] . You can also use Flickr's tags to create your own visualizations of how people are using tags [Hack #14] .
Whether you're tagging photos for personal organization or to take part in the larger Flickrverse, you'll find you can improve the way you tag by seeing how others are using tags to create new spaces for sharing photos.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Describe Your Photos
Taking some time to think about how you describe your photos on Flickr might help you find a wider audience for your pictures.
A photo might be worth a 1,000 words, but you can't extract those words from a photo automatically. To pool like photos together, Flickr needs your words, and there are several ways to describe your photos so that you can organize them and place them within their proper spaces in the larger Flickr ecosystem.
The most obvious photo descriptors you can use in Flickr are photo titles and descriptions. Titles are listed above photos and are usually just a few words long. Descriptions appear under photos and can be anything that won't fit into a short title. You can describe the photo in a few sentences, or tell an entire story about the photo in a few paragraphs.
You can add titles and descriptions when you upload a photo, or later (simply click the "Edit title, description, and tags" link to the right of the photo on the detail page). You can also edit them at any point by simply clicking the title or description. Figure 2-1 shows what editing a title looks like.
Figure 2-1: Editing a photo title
Click Save once you've made your changes, and your new title or description will be set.
In addition to appearing with the photo in your Flickr photostream, keep in mind that the photo title will be available in group photo pools, on your contacts' photo pages as they hover over a thumbnail of the photo, and anyplace on Flickr where your photo is shown. In other words, the title will be associated with your photo in many ways. Your descriptions will also appear in Flickr news feeds [Hack #17] .
Tags are keywords you can add to your photos. There are two main reasons to add tags to your photos. The first is for your own categorization. If you tag every photo of your cat that you post to Flickr with the word
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Play with Tags
Photo tags let you explore photos around a specific theme at Flickr, and thanks to the Flickr API, several applications let you explore Flickr photos interactively.
The Flickr API gives developers access to the photos stored there, and many developers have imagined new ways to view photos. Photo tags have given developers a new way to arrange photos in third-party applications.
Here are a few interactive examples that will give you a sense of how others are reusing Flickr images. By playing some of these games, you'll see how Flickr images can be used in new ways (and probably have some fun in the process).
Remember those memory games you played as a kid, where you had to turn over cards of matching pictures? Spanish developer Anna Fuster Fabre has recreated the game with Flickr images and Flash. To play, you'll need the Flash Player, which you can download from http://www.macromedia.com/flashplayer/ if you don't already have it. With Flash in place, browse to http://www.pimpampum.net/memry/enter.php, enter any tag, and click "play!" to start your game.
You'll see a 4 x 4 block of white tiles. Clicking a tile reveals an image that has been gathered from the Flickr API. Somewhere under another tile is the same image, and it's your mission to find all of the matches in as few plays as possible. The blue plays count lets you know how many times you've clicked on tiles. Figure 2-6 shows a game in progress for the tag infrared.
Figure 2-6: Memry game using the tag "infrared"
If you get frustrated and want to see what's under the tiles, click the "finish" link on the right side of the page. For a more challenging game, reload the page or click the "start again" link, and choose the 6 x 6 option.
You can use any tag you like, but patterns make for particularly difficult matching. If you can't think of any tags, try bricks,
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Geotag Your Photos
You can use Flickr tags to describe the exact location where you took a photo, and then display your geographically precise photos on a map.
Any location on Earth can be addressed with a set of two-number coordinates called latitude and longitude. While you probably learned about coordinates in school, chances are you haven't had much need for reading them, unless you make maps or go hiking in the wilderness. With the proliferation of handheld GPS units and online maps, though, latitude and longitude have wandered back into our everyday vocabulary—and into the world of Flickr photos.
Using Flickr's tagging features [Hack #10] , some members describe the exact latitude and longitude of their positions on Earth when they took particular photos. This practice is called geotagging, and it can lead to fun activities such as viewing your photos on a map and finding other photos that were taken in specific locations.
The recipe for geotagging your photos is simple. Note the locations where you take your photos, upload them to Flickr, and add three specific tags to the photos with the following formats:
geo:lat= latitude
geo:lon= longitude
geotagged
The geotagged tag lets others know that the photo has been given a specific location, and the other two tags describe that location. As you know, latitude and longitude aren't exactly found on every street sign, so the work involved with geotagging is finding out your coordinates.
Your first thought might be to rush out and buy a handheld GPS unit or a cutting-edge camera with GPS built in, and those are indeed great ways to find out your latitude and longitude at any given moment. However, there are also some free mapping tools on the Web, such as Geocoder.us, that you can use to find out where you are or where you've been.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Exploit Compound Tags
Compound tags make it easier to embed application-specific data into photos.
My friend Leo created a new group called One Word (http://www.flickr.com/groups/one-word/), which collects photos of single words. This is similar to the groups One Letter (http://www.flickr.com/groups/oneletter/) and One Digit (http://www.flickr.com/groups/onedigit/), which collect photos of individual letters and digits.
"Help!" Leo wrote to me, "What is a good way to tag the photos so they can be used for scripting purposes?"
Leo would like to enable people to make nice ransom notes [Hack #47] out of these photos, by identifying them with tags. Unfortunately, simply adding tags that match the words in the photos is not enough.
Why not? Consider the problem here. Let's say Leo adds the photo shown in Figure 2-13, of a gravestone containing the word PEACE, and tags the photo peace.
Figure 2-13: Leo's photo of a gravestone
There are lots of other photos on Flickr tagged with peace, and finding the one of the gravestone is going to be nigh on impossible unless you plan to write some fancy image-recognition software. And we really don't want to be wasting our computer cycles like that, do we?
"Aha!" you say, we can collect just the photos that are in the One Word group, using group membership as a filter. This will reduce the list to just photos that contain words. Or, we can add an additional tag to the photo, word, which will identify it as containing a word.
Certainly, we can use either of these filtering methods. However, it is probable that many of these photos will have multiple tags. Consider Leo's gravestone. It contains the following tags:
leol30
word
cemetery
peace
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Make a Flickr-Style Tag Cloud
Adding a tag cloud to your web site is easier than getting a bad haircut!
If the illustrations in these next few pages look familiar, you've seen tag clouds before. Tag clouds are clusters of tags rendered with differently sized fonts to indicate the relative popularity of the tags in a dataset. Click on any of the tags to retrieve data matching that tag (such as photos).
Flickr used tag clouds first, followed by other Web 2.0 sites such as Technorati. Now, tag clouds seem to be ubiquitous, appearing on nearly every new web site that wants to join the Web 2.0 party. Perhaps that's why Jeffrey Zeldman proclaimed tag clouds "the new mullets."
Fortunately for those of us who are still mulletless, Dan Steingart has written a script that makes a tag cloud from the tags associated with your Flickr photos. The script is nearly ready to go and requires just a few minor modifications.
To use Dan's script, you'll need your own Flickr API key [Hack #40] .
You'll also need the phpFlickr scripts [Hack #41] (which also make authenticating other people a snap, although you won't need authentication for this hack). You can download these scripts from http://www.phpflickr.com.
To get started, install the phpFlickr scripts on your web site, as described in [Hack #41] . Then download and unpack Dan Steingart's cloudTagFlickr script, which is available from http://www.allthingsalceste.com/cloudtagflickrphp/.
In the cloudTagFlickr.php script, edit the following two lines to use your own username and API key:
$username = "flickruser"; //flickr user name here
$flickrapikey = "flickrapikey"; //key in here
The phpFlickr wrapper has an optional cache feature. If you want to use it, modify these lines to provide access information for a database on your server:
$cachingenabled = true;
$dbUser = "
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 3: Viewing Photos
One of the most fun aspects of using Flickr is discovering amazing photographs. Clicking through the pages of Flickr is like walking through an enormous public gallery where anyone can hang a photo and have a conversation about that photo with someone else. You'll find several ways to view photos on Flickr, and getting to know the basic page layouts will help you navigate this gallery and find photos that you connect with.
One basic page you'll encounter frequently is a Flickr photostream. A photostream is all of the photos that belong to a specific photographer, displayed in order from newest to oldest. For example, Figure 3-1 shows a Flickr photostream for one of the authors of this book, with the most recently added photo at the top and the rest following in reverse-chronological order.
Figure 3-1: Flickr photostream
From the photostream page, you can navigate to other Flickr areas related to a particular photographer. Clicking the Profile link will reveal more information about the photographer; the Favorites link will show you photographs by other members that this user has marked as favorites, and the Sets link will show you all of the photographer's groups of photographs.
Clicking a photo in the photostream will take you to a larger version of the photograph on a photo detail page, as shown in Figure 3-2.
Figure 3-2: Flickr photo detail page
You can end up at a photo detail page from many locations across Flickr, and it's probably where you'll spend most of your time at Flickr. From the photo detail page, you can find all of the information related to a photo, including the title, description, tags, copyright details, date taken, and number of times the photo has been viewed. You'll also be able to see which photo sets the photo belongs to, which groups the photo has been added to, and a link to the photographer's photostream. Any comments related to the photo will be displayed below the description on the photo detail page.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Hacks 15-23
One of the most fun aspects of using Flickr is discovering amazing photographs. Clicking through the pages of Flickr is like walking through an enormous public gallery where anyone can hang a photo and have a conversation about that photo with someone else. You'll find several ways to view photos on Flickr, and getting to know the basic page layouts will help you navigate this gallery and find photos that you connect with.
One basic page you'll encounter frequently is a Flickr photostream. A photostream is all of the photos that belong to a specific photographer, displayed in order from newest to oldest. For example, Figure 3-1 shows a Flickr photostream for one of the authors of this book, with the most recently added photo at the top and the rest following in reverse-chronological order.
Figure 3-1: Flickr photostream
From the photostream page, you can navigate to other Flickr areas related to a particular photographer. Clicking the Profile link will reveal more information about the photographer; the Favorites link will show you photographs by other members that this user has marked as favorites, and the Sets link will show you all of the photographer's groups of photographs.
Clicking a photo in the photostream will take you to a larger version of the photograph on a photo detail page, as shown in Figure 3-2.
Figure 3-2: Flickr photo detail page
You can end up at a photo detail page from many locations across Flickr, and it's probably where you'll spend most of your time at Flickr. From the photo detail page, you can find all of the information related to a photo, including the title, description, tags, copyright details, date taken, and number of times the photo has been viewed. You'll also be able to see which photo sets the photo belongs to, which groups the photo has been added to, and a link to the photographer's photostream. Any comments related to the photo will be displayed below the description on the photo detail page.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Add Flickr Search to Firefox
To find photos quickly at Flickr, you can add a Flickr option to your Firefox quick search box.
If you use the Firefox web browser (http://www.mozilla.org/products/firefox/), you're probably already aware of the useful search box in the upper-right corner. From any page, at any time, you can simply type a search term into the box and press Enter, and the results page will come up in the browser.
Though Google is the default search engine, you can click the arrow to choose another search engine via the search box's handy drop-down menu, as shown in Figure 3-4.
Figure 3-4: Firefox quick search options
The nice thing about this list of potential search engines is that you can add any search engine of your choice. In the drop-down list is an Add Engines... option that takes you to a page with more search choices, which you can install with a few clicks. The New Search Engines section of the Mozilla site contains a page with seven different Flickr-related searches you can add to the Firefox search box (Mozilla is the technology behind Firefox). These searches are primarily for searching through Flickr forums, groups, and tags.
To add a Flickr search engine, simply go to http://mycroft.mozdev.org/download.html?name=Flickr and click the name of the search engine you'd like to add. A pop-up box will ask you to confirm your choice; click OK, and the new choice will be available in the Firefox search box menu. Behind the scenes, Firefox has copied a small .src file and icon to the searchplugins directory of the Firefox installation. This text file defines how the search works.
If you don't find the perfect Flickr search at the Mozilla page, it's fairly easy to build your own specialty Flickr search and add it to your list of available search engines. This hack shows you how.
To search for photos at Flickr by a specific tag, a set of tags, or words in the titles and descriptions, browse to the Flickr Search page (
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Find Pictures You Can Reuse Legally
Use the Flickr Creative Commons tools to find photos with special licenses or let others know how they can use your photographs.
Most of the photos you see at Flickr are copyrighted. The default license setting at Flickr is a standard copyright, which means the original photographer controls how the photo can be used. Unfortunately, you can never be sure how a particular photographer will react if you use part or all of her work in your own project.
Say you're preparing a public presentation and you'd like to use a photo of the Liberty Bell to illustrate a point. Unless you specifically obtain permission (and possibly pay a fee), you can't be sure the creator of a photo you find on the Web won't sue you for copyright violation. While there is a legal term called fair use that protects some use of copyrighted materials—especially for educational purposes—it's hard to know exactly what uses fall under this legal definition, because the concept of fair use is only vaguely defined. Without contacting the photographer or owner of the copyright, there's no way to know what they'll consider a fair use of their materials.
This legal ambiguity is one of the reasons that the nonprofit group Creative Commons (CC) has made several alternative licenses available to artists who want to license their work in more specific ways than a general copyright provides. For example, you can make your work available to anyone who wants to use your photos on the condition that they're used for noncommercial purposes, but you can still require payment for any commercial use. This means someone can freely use one of your photos licensed in this way for, say, a school report, but he'd need to pay you for your photo if you he were compiling a book he intended to sell. With a Creative Commons license, everyone knows exactly how you would like your work to be used—or not used.
Using photos under a CC license is just as easy as sharing them. One compelling aspect is that as long as you're following the conditions set forth in the license, you don't need to pay a photographer to use her work—or even contact her to ask permission. If for any reason you'd like to use the work in a way that's not covered by the license, however, you'll need to get in touch with the photographer. Basically, you just need to know how the Creative Commons licenses work to make sure you're playing by the rules.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Subscribe to Flickr
Flickr offers RSS and Atom news feeds of much of its data, making it easy to keep track of your favorite people, groups, and tags.
News feeds have revolutionized the way people read sites on the Web. Instead of browsing hundreds of pages across the Web every day, you can use software called newsreaders to subscribe to news feeds and display any new information in a friendly, consistent format.
The folks at Flickr have recognized the demand for news feeds and have made most of the data you see on the web site available in a number of different feeds. For example, if you want to track a particular photographer, you can add that person's photostream feed to your newsreader and see any new photos he posts without ever visiting Flickr.
The first step to subscribing to a Flickr feed is finding a feed URL that you can copy and paste into a newsreader. You can spot news feeds on Flickr by looking at the bottom of the page for feed options like the ones shown in Figure 3-11.
Figure 3-11: The feed options found at the bottom of many Flickr pages
News feeds are structured XML documents intended to be read by machines rather than humans. Flickr offers feeds in both RSS (Really Simple Syndication) and Atom formats; you won't notice a difference between the two, and you can use either format in most newsreaders. To copy a feed URL, right-click (Command-click on a Mac) on either the RSS 2.0 link or the Atom link and choose Copy Link Location from the menu. The feed URL will then be available on your virtual clipboard.
In addition to links to the feed URLs, you'll notice an "Add to My Yahoo!" button that lets you automatically add the feed to Yahoo!'s news portal (available at http://my.yahoo.com). Click the button to add that particular feed to My Yahoo!
By far, the easiest way to add a feed to your newsreader is by copying the URL from the bottom of a Flickr page. If you pay attention to the feed URLs, though, you may be able to construct your own Flickr feed URLs in less time than it would take to browse to the appropriate pages and copy the links.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Rate Photos
An independent application called flickRate adds a rating system to Flickr, allowing you to judge which photos are funny, original, or beautiful.
A puzzling aspect of Flickr is that there's no way to rate the photographs you see. Amazon lets you rate any of its products, eBay lets you rate sellers, Netflix lets you rate movies, and there are hundreds of other sites that let you use a star or other rating system to voice your opinion about products on offer or elements of the site.
Flickr's creators have distinctly chosen not to include ratings—possibly to avoid turning it into a competition. Every photo has value to someone, and they might have felt that a ratings system wasn't the atmosphere they wanted to provide. Instead of ratings, Flickr provides a way for you to mark certain photographs you see as "favorites."
Above any photo on the photo detail page, you'll find a button that says "Add to Favorites." Click the button, and you'll essentially bookmark that picture so that you can view it anytime in the future. To see all of your favorites on one page, as shown in Figure 3-16, click the "Your favorites" link on your Flickr home page.
Figure 3-16: Flickr favorites page
Even though thousands of Flickr users are adding favorites day in and day out, there's no way to see global patterns to answer this question: "Which photos across Flickr are most often added as favorites?"
Just because Flickr doesn't offer ratings doesn't mean that you can't take part in a ratings system, though. An application called flickRate by Nicolas Hoizey lives a parallel life alongside Flickr and gives Flickr users a way to rate the photos they see. flickRate also gives you a look at the highest-rated photos, determined by people using flickRate.
flickRate lets you rate photos based on three criteria: Aesthetics, Originality, and Fun. Instead of giving a photo a simple star rating, you rate based on these three criteria on a scale of 1 to 7. If you think a photo is beautiful but lacks originality or a sense of fun, you