Lightroom web galleries from the ground up
One reason why I still use iView rather than switching completely to Lightroom is because I prefer its HTML web gallery templates. iView takes about a third of Lightroom's time to output a big contact sheet style web gallery of say 100-300 pictures because it uses my DNG files' embedded previews, while Lightroom seems to insist on re-rendering the raw files when you're previewing the gallery in Web, again each time you change an output setting, and then again when it actually starts generating them.
A second reason is because I can edit iView's HTML-based templates much more easily. Going back to Lightroom 1.0, the original XML and XSLT templates appealed to the geek in me, but I always felt they were misguided, a developer's solution which demanded a far higher level of skill than even the IT-minded photographer was likely to possess. While you can inch up the HTML learning curve, tweaking templates in small yet rewarding steps, XML and XSLT customization require much more experience. That aspect didn't worry me too much because I used to implement XML and XSLT solutions professionally, but iView works perfectly for my contact sheet galleries and my main site is powered by an online database and some iView scripts. So I never felt customizing the Lightroom XML and XSLT templates was worth the effort. I was rather surprised, impressed, that anyone else bothered.
That thunderous lack of interest cascaded over to the Lua-based templates or “engines” which arrived with Lightroom 1.3. And at the time I was much more enthusiastic about learning Flash and ActionScript. In fact I still am - once I actually launch the Flash site, I'll update it via SlideShowPro's excellent Lightroom-SSP Director export plug-in. That's one click to run the Lightroom export, one click to activate the new web gallery. Beat that, Lua.
Still, I'm really glad to see Sean McCormack is doing a bite-sized series on writing Lightroom web engines, starting with Anatomy of a Lightroom HTML Gallery:
Lightroom HTML galleries used to be written in a mix of XSLT and XML. The simpler coding in Lua makes it a pleasure to create HTML galleries with. You can write Flash galleries in Lua, but because IE doesn't allow plugin loading on PC Lightroom, you can't see them in the preview window. Hence 3rd party Flash galleries use the old method for cross platform compatibility.
Lua galleries were introduced in Version 1.3 and have matured somewhat with V2.0. The new syntax is much tidier and more compact. In fact Matthew Campagna shaved 500 lines off one of his galleries for version 2, and my new website in a gallery LRB Portfolio managed close to that also.
So what comprises a Lua Gallery? Well the absolute minimum a gallery can contain is 3 files: galleryInfo.lrweb, manifest.lrweb and a HTML file. Let's look at them in a little more detail….
And part 2 is over here. You never know, now I've cracked Flash and ActionScript, this might even encourage me to learn Lua at long last.
Other resources for Lightroom Web:
- Lightroom 2 SDK now includes the web engine, as well as export and the beginnings of custom metadata
- SlideShowPro Director is an online management system for web photo galleries and powers my new site
- SSP-Director plug-in for Lightroom makes updating it a dream
- SSP for Lightroom is their standalone web gallery engine
- GalleryMerger is a tool for hassle-free maintenance of standalone SSP multi-album galleries
- The Turning Gate
- Lightroom galleries (with added exclamation marks)