gally.js will target and hyperlink HTML elements specified by their id and set said element’s text and href to appropriate attribution information as provided. Gally.js is client-side and is dependant on the file hierarchy information it is provided and requires numerical image file organization. For example:
├───/images/ │ │ │ ├───/hermes/ │ │ 1.jpg │ │ 2.jpg │ │ 3.jpg │ │ │ ├───/hubert/ │ │ 1.jpg │ │ 2.jpg | |
By including the following in a
.html file body:
The webpage will choose an available image at random, set the image as the page background, and set the innerHTML and href of the hyperlink “credit” to the correct attribution name and website of the displayed image.