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:
.slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  z-index: 1;
  background: url(https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/YouTube_Silver_Play_Button.svg/100px-YouTube_Silver_Play_Button.svg.png) no-repeat center center;
}

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:

<div class="separator" style="clear: both; text-align: center;">
<a href="//4.bp.blogspot.com/-mKl4KWvUF_Y/VmP64PCkPNI/AAAAAAAAMGo/0kfKVAelYIU/s1600/blogger.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img border="0" src="//4.bp.blogspot.com/-mKl4KWvUF_Y/VmP64PCkPNI/AAAAAAAAMGo/0kfKVAelYIU/s640/blogger.jpg" /></a>
</div>

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:

<div class="separator" style="clear: both; text-align: center;">
<a href="https://picasaweb.google.com/113035479725087349147/GlobalNomadCouplePaiviSanteri#slideshow" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img border="0" src="//4.bp.blogspot.com/-mKl4KWvUF_Y/VmP64PCkPNI/AAAAAAAAMGo/0kfKVAelYIU/s640/blogger.jpg" /></a>
</div>

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.

<div class="separator"  style="position: relative; clear: both; text-align: center;">
<a href="https://picasaweb.google.com/113035479725087349147/GlobalNomadCouplePaiviSanteri#slideshow" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img border="0" src="//4.bp.blogspot.com/-mKl4KWvUF_Y/VmP64PCkPNI/AAAAAAAAMGo/0kfKVAelYIU/s640/blogger.jpg" /></a>
</div>

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"

<div class="separator" style="position: relative; clear: both; text-align: center;">
<a href="https://picasaweb.google.com/113035479725087349147/GlobalNomadCouplePaiviSanteri#slideshow" target="_BLANK" title="View slideshow" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img border="0" src="//4.bp.blogspot.com/-mKl4KWvUF_Y/VmP64PCkPNI/AAAAAAAAMGo/0kfKVAelYIU/s640/blogger.jpg" /></a>
</div>

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>

<div class="separator" style="position: relative; clear: both; text-align: center;">
<a href="https://picasaweb.google.com/113035479725087349147/GlobalNomadCouplePaiviSanteri#slideshow" target="_BLANK" title="View slideshow" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">
<img border="0" src="//4.bp.blogspot.com/-mKl4KWvUF_Y/VmP64PCkPNI/AAAAAAAAMGo/0kfKVAelYIU/s640/blogger.jpg" /><span class="slideshow"></span></a>
</div>

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!

Comments

The most popular posts

Installing Windows 7 on Dell Vostro 14 5000 Series Laptop

Being Vegan in Russia

The Best Laptop for Travelling and Working on the Road

Securing Windows 7 Against Microsoft and Other Threats

Free Documentary Film: Crossing the Darién Gap (2013, 2016)

Some 3711 Tweets and 1023 Days Later