Picasa Web Albums seems to be smart at preventing image hotlinking. They have this embed feature that provides a link back to Picasa Web Albums and that works fine. But if you just try and take the image URL and embed it I find it breaks pretty soon.
For instance here is an image embedded using the Picasa Web Albums code that is available from the left hand bar in Picasa Web Albums:
The above code snippet straight from Picasa Web Albums uses this URL for the image: http://lh6.google.com/samdavyson/ROm95iJ2ABI/AAAAAAAAAFM
/ZpTxZPsUuIA/flower.jpg?imgmax=288. If you just use this URL and not the link back to Picasa it still seems to work. Here is one just using the URL:
But when you remove the thing limiting the image’s size (?imgmax=288) it breaks.
As you don’t see the image above it has clearly broken. The clever bastards. So lets see if it will work with another value of imagemax. So lets try 576 (2 x 288):
No. That doesn’t work either. So at the moment you can only hotlink in the 288 size. I hope Flickr doesn’t start using similar technology soon.
This entry was posted on Tuesday, September 12th, 2006 at 4:42 PM and filed under Google, Web.
Follow comments here with the RSS 2.0 (XML) feed.
Post a comment or leave a trackback.
Comments (4) to “Hotlinking Picasa Web Albums Images”
Kind of fun… if you disable sending the Referer header, the hotlinking works for all the sizes. In Firefox, set the preference network.http.sendRefererHeader to 0. I’m looking at your page right now, and it’s showing the 1280×1022 size just fine.
I can’t really recommend this in general, since I assume some sites use positive matching (i.e. allow hotlinking if HTTP-Referer matches) rather than negative (disallow hotlinking if HTTP-Referer doesn’t match). But, it’s interesting.
(Here’s a good reason right here… this comment form uses Referer checking. I can’t submit without a Referer header.)
Google’s Picasa Web Albums is a simple tool to get your photos on the internet for sharing with friends and family. It is a bit of an antisocial Flickr at the moment as there is no central portal to search everyones photos or a place where various categories of photos are aggregated. If you want to get an occassional screenshot or image online then it might be a tool that you’d consider using.
Here is how to hotlink to Picasa Web images:
1. Go to your Picasa Web Album.
2. Right click on the image, and choose view image.
3. Delete the ?imgmax=144 (or some other number).
And that is it. The URL you have will work for posting your image on blogs, forums, or websites. Here for instance is the flower picture from the example above (source of image Mel & John Kots):
As a proof of concept all the images in this blog post are hosted on Picasa Web Albums. View the whole lot in my Flowers album. Alternatives of course include using Flickr, or a service like AllYouCanUpload.com, but I like the simplicity of the interface on Picasa Web even if the hotlinking process is a little more involved.
benizi wrote:
Kind of fun… if you disable sending the Referer header, the hotlinking works for all the sizes. In Firefox, set the preference network.http.sendRefererHeader to 0. I’m looking at your page right now, and it’s showing the 1280×1022 size just fine.
I can’t really recommend this in general, since I assume some sites use positive matching (i.e. allow hotlinking if HTTP-Referer matches) rather than negative (disallow hotlinking if HTTP-Referer doesn’t match). But, it’s interesting.
(Here’s a good reason right here… this comment form uses Referer checking. I can’t submit without a Referer header.)
Posted on 01-Nov-06 at 10:13 pm | Permalink
antonio wrote:
I am using Opera 9.21 with referrer sending activated, and I can see the imagemax=576 version just fine.
Posted on 30-Jun-07 at 12:57 pm | Permalink
deizel. wrote:
yup, antonio is correct. you can now hotlink various sizes: 228 576 640 800 maybe more..
Posted on 11-Sep-07 at 4:35 pm | Permalink
Chris wrote:
Allowable sizes for the thumbsize and imgmax query parameters are published by Google at: http://code.google.com/apis/picasaweb/reference.html
800px max is the largest currently allowed for embedding images.
Posted on 19-Nov-07 at 5:20 pm | Permalink