Modify Lightroom Build-in templates

When I upload images to (and thus not uploading them to Picasaweb), I’m using the Lightroom build-in Flash template, since that is exactly what I was looking for. Not too fancy, but not too simple either. Only minor is that I had to add my Google Analytics code every time to the generated html page. But I always forget to add it before uploading and I notice that only a day later, when the gallery was visited already and thus I loose some analytics.

Yesterday, once again, I generated a new gallery, uploaded it to the server but forgot to add the Google Analytics script. And that I noticed today so I opened the html to add the script and… was surprised the script was already there!
Then I remembered, I was once searching for a way to modify this template in order to have this Google Analytics script automatically added: I wanted to change the build-in template and insert the script so that it would be there every time I generate a new gallery.
I know I did a long research for it and finally found how to do this. But that’s a long time ago.

At this point, I started a search on the Internet to find out which file I once edited but… I couldn’t find it anymore. So I started a search locally and finally found the template.

On a Mac, the default flash template, which includes the html you have to change, is located inside the Adobe The file /Applications/Adobe
is the one you want to change.

To find this file using the Finder:

  • Go to /Applications, select Adobe and Action > Show Package Contents
  • Browse to Contents/PlugIns/ Select Web.agmodule and Action >Show Package Contents
  • Browse to Contents/Resources/galleries/, select default_flash_lrwebengine and Action >Show Package Contents
  • There you can see different files and folders, one amongst them is index.html and that is the file you want to change.

Open this with any text editor (but be aware that as of Leopard, opens HTML in a WYSIWYG mode! I prefer Dashcode, but then you must have installed the optional Developer part of Mac OS X) and add the Google Analytics script at the bottom of the file (as described online). Save the file and generate your gallery. You’ll see that the Google Analytics code is right there!

Other templates are right there, in the Web.agmodule/Contents/Resources/galleries


  1. July 25, 2008

    Excellent, I was just wondering if this would work. Glad to hear that it does. Hopefully LR 2 has more easily user modifiable web templates.

  2. April 1, 2009

    Thanks! This information was very useful, and I added Google Analytics code to my HTML template based on this.

    Since I now have my own blog, I wrote a similar post based on my experiences, but using a slightly different approach and some more details. I also think the name and location of the files has changed in Lightroom 2.3.

    It would be nice if Adobe added the Google Analytics feature in the next version..

Comments are closed.