Mobile-Friendly Non-Flash Picasa Photo Slideshow
The death of Flash has left Picasa users stranded as Flash is the only official way Google is offering for embedding slideshows into blogs and websites. Flash is not mobile-friendly, and many users have disabled it thanks to security issues. How to embed Picasa slideshows into blogs and website without flash?
Why not iframe or slidemypics?
It was possible to show slideshows using iframe until Picasa website started sending X-Frame-Options (XFO) headers to prevent clickjacking. Now it would require using a reverse-proxy for getting rid of XFO, making it both slow and dependent on the proxy provider. Another solution is to use a third party webservice called slidemypics. However, their service requires you to give them your Picasa login and password, which should not be necessary as Picasa API allows unauthenticated access to public albums, and slidemypics might vanish soon leaving you again stranded.
For us, having to fix all slideshows in 200+ posts was not a tempting idea. Instead, we developed the following, more permanent workaround for Blogger. As long as Picasa slideshow link structure remains the same, it works in every web browser and mobile device. Here is an example how it works and what it looks like.
Instructions for Blogger Dynamic Views
First you need to go to Blogger dashboard, select Template, Customize, Advanced, and Add CSS.Add the following code to Add custom CSS box:
Click Apply to Blog button to save the changes.
That CSS code will show centered play icon on top of the photo linking to the slideshow. You need to do this modification only once.
Now you can use Insert image/From Picasa Web Albums to add the slideshow cover photos to your blog posts.
To do that, you need to customise the following html code that Blogger inserts to your blog post:
1. Change the link url (starting from <a href=") to the web address of the slideshow.
You can get the address from Picasa: open an album and click Slideshow on the top left corner. After that, you can copy the slideshow address from your browser's address field. Copy the address until "#slideshow", for example https://picasaweb.google.com/113035479725087349147/GlobalNomadCouplePaiviSanteri#slideshow
After that, the html code looks like this:
This adjustment will make the browser show the whole slideshow instead of a single image.
2. Add the following CSS code to the beginning of the style tag: "position:relative;"
If your image is centered, you need to add it to the first style tag inside div, otherwise to the second style tag. Putting the code to a wrong style tag will result play icons showing in the wrong place. If that happens, move the code to the other style tag and try again.
This change is needed for placing the play icon in the middle of the image.
3. Add the following into the anchor tag a: target="_BLANK" title="View slideshow"
Tooltip will now tell the viewer "View slideshow", and the slideshow will open in a new tab.
4. Add the following before the closing anchor tag </a>: <span class="slideshow"></span>
Thanks to this, the play icon is showing on top of your photo album's cover image, prompting user to click and view the slideshow.
Save, Publish or Preview your post, and you have just created a mobile-friendly, non-flash Picasa photo slideshow in you Blogger Dynamic Views blog. Remember to view and click slideshows to make sure there are no problems. Happy hacking!