screenshot 21-08-2016 09.50.19

The user was specifically asking “I am trying to create a web gallery using the Grid Gallery but its Multiple page option only allows 5 or 10 or … items per page. Can I use 12 items per page for this specific gallery?”

How can I customise a built-in web gallery?

If you know your way around your computer’s program folders, and if you can hack a Lua file in a text editor like Notepad or TextEdit, you can certainly expand the choices you see in Lightroom. It’s really not too difficult and you might just enjoy it.

Let’s say what we want to do is customise the Grid Gallery and, as shown on the right, we want to be able to specify more than 10 items per page. To do this we’re going to make a copy of the built-in template, change its ID, change that drop down box, and restart Lightroom.

So, the built-in gallery templates are in:

  • Windows:  C:\Program Files\Adobe\Adobe Lightroom\Shared\webengines\ (Windows)
  • Mac – go to Applications, Lightroom Classic, and right click to Show Package Contents. Inside the app’s package is Shared/webengines/

The grid gallery is known as “Standard”, so copy the LR-Gallery-Standard.lrwebengine folder and temporarily paste it on your desktop. Rename it something like LR-Gallery-Mine.lrwebengine.

Now, go inside the folder and you’ll need to edit galleryInfo.lrweb. Open the file with a text editor like Windows Notepad or Mac TextEdit, and look for these two lines:

title = LOC “$$$/AgWPG/Templates/HTML/Standard/Title=Grid Gallery”,
id = “com.adobe.wpg.templates.html5.standard”,

These need to uniquely identify your custom gallery, so change the two lines to something like:

title = LOC “$$$/AgWPG/Templates/HTML/Standard/Title=Grid Gallery – Mine“,
id = “com.adobe.wpg.templates.html5.mine“,

The drop down box for the number of rows is defined at line 274. If you’ve got this far, you’ll understand how to add extra choices such as 12 rows per page. It’s simple cutting and pasting, but just take care with the syntax. That should be all the editing for this simple customisation.

Now you need to move the folder into a subfolder called “Web Galleries” which is in the Lightroom preferences & presets folders. Get to this via Preferences > Presets or use direct links:

  • Windows: C:\Users\USER\AppData\Roaming\Adobe\Lightroom\Web Galleries
  • Mac: USER\Library\Application Support\Adobe\Lightroom\Web Galleries

So Web Galleries is a subfolder at the same level as Metadata Presets, Print Templates etc (if Web Galleries doesn’t exist, create it at that level), and put LR-Gallery-Mine.lrwebengine inside it. Restart Lightroom and “Grid Gallery – Mine” should be listed. That’s it!

 

Further reading

For more technical information on web engines, see the Lightroom SDK.

Sean McCormack’s article Anatomy of a Lightroom HTML Gallery is worth reading.