Blogger and Linode VPS - Part 2: Templates and custom domains

24 Hour Apps uses a template from Blogger Templates that uses Blogger's XML to define elements. The new template format is actually a very good solution to the template usability and achieves being dead easy for the user with a minor learning curve for the template creator. However using templates with a non-standard configuration does have its share of problems one of which is Blogger's image hosting limitations.

Blogger says that custom domains should be able to load uploaded images less than 400 pixels wide, something I am yet to test, however for templates that rule appears to be even stricter as I was unable to view any images once I updated my blog with a downloaded template. The solution is actually quite simple, although somewhat time consuming.

To fix Blogger template images not loading in custom domains you need to open the XML template file and look for referenced images by looking for either .png, .gif, .jpg, or other image formats used by the template. Once you find some images you need to download and put them on a server with less restrictive linking policies. I already set up an account on my Linode VPS for the 24 Hour Apps blog so I just saved all template images in to a folder that user's account. Then it was just a matter of adding a virtual host entry for that account, ie. to make the image files available to the public.

The final step is to update the image references in the template XML so that they point to your saved images (see screenshot below). This is far more time consuming than it needs to be because Blogger generates extremely long and random URLs for its hosted images. After all image locations have been updated upload the modified template and everything should work as expected.


Post a Comment