Template usage

It is recommended to create your own templates! You can find patterns in the plugins folder in the templates/sample folder. Create a gallery-from-files folder in the (child) theme of your page, and then create your own templates here, creating your own folder for each template.

In the shortcode or when pasting the gallery, you can refer to or select the name of this folder.

It works just like handling a child theme in WordPress. When used, the system checks to see if you can find the file you need under the theme you are using and, if so, will use it. If you can’t find it, the plugin will look for it in the directory of the template with the same name. (If you can’t find it anywhere, it won’t show anything.)

Templates simply work on the substitution principle. For example, replace [TITLE] with the name of the folder or image; text [IMAGE] to the full link of the image. Things are simpler than they seem! If in doubt, look into the sample folder.

When using the template, the plugin checks to see if *.css and/or *.js files are found in the template folder. If so, they are loaded properly. Next, it searches for four types of files in the following order:

  • folder.html
    Displays a folder. You will use the first image in the folder to display it.
    If you find a [POPUP_IMAGES] entry in this template, you will also look for a popup-images.html template that will be applied to all the images in the folder.
  • folders.html
    Used to display all the folders in a folder. (Appears in paged form, if needed.)
    Handles [POPUP_IMAGE] in the same way as above.
  • image.html
    Used to display an image.
  • images.html
    Used to display all the images in the folder.

If you have more than one of the above files in your template folder, you will use each of them in that order.

If thumbnails or WebP images are not available when they are displayed, they are automatically rendered. You only auto scale or watermark when auto mode is on in the setting.