4Blogging – External Image Hosting – Picasa – Part 1

This post will explore the option of hosting images using another provider such as Picasa to reduce hosting bandwidth/storage. The prerequisite is to have and account with a public gallery already set up.

Here we will attempt to link to thumbnails and when clicked on open a lightbox style full image to the user. If successful a standard interface will be created that all third party image hosting modules can be built against as part of the overall plug-in environment that 4Blogging is to support, this will enable developers to build their own plug-ins for providers that are not catered for out of the box.

To start with we will need the Google Data API SDK for .NET this can be downloaded here:


After working through the Google Data/Photo API, Silverlight, JQuery and WCF RIA Services I have come to the following conclusions.

  • Silverlight connecting directly to the Picasa service is not possible as the Google Picasa web would have to have a valid clientaccesspolicy.xml file granting cross domain access.
  • JQuery can be used to call the Picasa service but the communication between Silverlight and JQuery with JQuery making async calls has too much of an overhead.
  • WCF can communicate directly to the Picasa service and stream to Silverlight but this would defeat the object of saving bandwidth.
  • While Silverlight cannot call the service it can display an image from Picasa given the URI.

With these points in mind, in Part 2 of this post, I will prototype a solution that has a WCF RIA service that can be called from Silverlight and returns a list of images within a library that are loaded directly from Picasa. This should minimise the required bandwidth as the images are pulled directly from Picasa and only data is transferred via the service.

The code for this will be posted to the CodePlex site when complete.

Leave a Reply

Your email address will not be published. Required fields are marked *