Given my concern with image theft, I do not like to hear about Flickr hacks. A while back, a Flickr hack circulated around that allowed people to view an image’s full size even if the photographer didn’t allow it (provided the image was uploaded at high resolution.) The hack was based on Flickr’s standard URL structure for both pages and image file names, and allowed people to get at the original sizes in two ways. It was so easy to use, and the security hole was so big, that I was shocked Flickr didn’t take care of it as soon as the hack started to make the rounds.
It’s been a few months now, and I’m glad to say the hack no longer works. I’m not sure exactly when they fixed it. Since it’s no longer functional, I might as well tell you how it worked, and how they fixed it.
First, let’s look at a page’s URL structure. Take this photo of mine (reproduced above). The URL for the Medium size (the same size that gets displayed on the photo page) is:
Notice the last URL parameter: size=m. The URL for the Original size is the same, except for that last parameter, which changes to size=o. That makes the URL for the original photo size:
Thankfully, that no longer works. If the photographer disallows the availability of sizes larger than Medium (500px wide), then you get an error that says something like “This page is private…”
Second, they’ve randomized the actual file names. So although that image of mine is number 511744735, and it stands to reason that I would be able to access the file by typing in something like http://farm1.static.flickr.com/231/511744735_o.jpg, that’s just not the case. Each file name is made up of that sequential number, plus a random component made up of letters and numbers, plus the size indicator. So the actual path to the medium size of the image file is:
This may lead you to think that if you can get that random component from the URLs of the smaller sizes, you can then apply the same URL structure to get at the larger size, but this is also not the case. It turns out that Flickr randomizes that middle part again for the original size. So although it stays the same for all sizes up to 1024×768, it’s different for the original. For example, the URL for the original size of that same photo is:
This means that even if you go to the trouble of getting the file name for one of the smaller sizes, you cannot guess the file name of the original photo, and this is great news for photographers worried about image theft.
While I’m writing about this, let me not forget about spaceball.gif, the transparent GIF file that gets placed over an image to discourage downloads. It can be circumvented by going to View >> Source and looking at the code to find the URL for the medium-size image file. It’s painful, but it can be done, and I understand there are some scripts that do it automatically. The cool thing is that after Flickr randomized the file names, it became next to impossible to guess the URL for a file’s original size. The best image size that someone can get is 1024×768, which might be enough for a 4×6 print, and can probably be blown up with special apps to a larger size, but still, it’s not the original.
Perhaps it would be even better to randomize the file name for the large size as well, so that it’s different from the smaller sizes and the original size. That would definitely take care of the problem. Still, this is a big step in the right direction.
12 thoughts on “Flickr tightens up image security”
You do realize that as of March 2009 there are NEW flickr hacks that let you grab the original image. I don’t know how they work but they work. I am not interested in image theft, I have limited vision and the original size is usually the only thing I can see well and I won’t even VISIT a flick user that has Original Size disabled. without this ability, in fact I block them.
I hadn’t looked into it lately, so I didn’t know about the new hacks. As for what you’re doing, I can understand it, although blocking people just because they’ve disabled the original size, for whatever reasons, is, well, asinine.
Pingback: Firefox Extension: Flickr Original | JZ * LABS - the web experiment playground of jason ting
Pingback: Shoot first and ask questions later? by Raoul Pop
Pingback: Stick a fork in Zooomr, they’re done
Pingback: ComeAcross » Choosing between Flickr, Zooomr and Picasa Web
I noticed this when it changed because I use Flickr to host images for my photoblog. I upload 700px wide or high images and use the original image in my posts by changing the _m to _o in the URL. It royally pissed me off when that stopped working but I hadn’t thought that the change was made to protect original size images.
No wonder they never explained why that change was made when I complained..
Thanks Paul! Glad you found this useful.
Great article and thanks for submitting to the website!
Yup, I did, and your post was a great reference when I wrote this one. I linked to your blog twice in that post. Thanks!
Great write up. I didn’t realize they fixed the bug. Don’t know if you saw my post on it a while back. Great update.
Comments are closed.