Auto Gallery
Auto Gallery is a content plugin that turns the {auto-gallery} shortcode
into a responsive Bootstrap 5 image gallery, with an optional lightbox. The images come from a folder on your
site: one you name in the shortcode, or one that matches the page's address.
New to Auto Gallery? This page is the reference manual. For an overview, with the download, see its page on cybersalt.com.
Release history. This page documents the current release (2.0.0). For what changed in each version, see the changelog.
Requirements. Joomla 5.0 or newer (it runs on Joomla 5 and Joomla 6) and PHP 8.1 or newer. Your template needs Bootstrap 5 for the grid (Cassiopeia and most current templates have it).
Auto Gallery is a paid extension: one purchase covers as many of your sites as you like. Get it from cybersalt.com.
⤢ Click to enlarge
{auto-gallery folder="headers"} with the default settings.Installing
- Log in on cybersalt.com and download the ZIP from your downloads page.
- In the administrator, go to System → Install → Extensions and upload it.
- Go to System → Manage → Plugins, open Content - Cybersalt Auto Gallery and enable it.
- Set Gallery Root Folder and Gallery Root Web Address (see below), then save.
- On the Pro Activation tab, enter the email of your cybersalt.com account and save, so updates arrive through System → Update → Extensions.
Where the images come from
Every gallery reads from a folder inside the Gallery Root Folder. A shortcode can never point outside it.
| Shortcode | Folder used |
|---|---|
{auto-gallery folder="events/picnic"} |
<root>/events/picnic. Use this in articles. |
{auto-gallery} |
Worked out from the page address. The last part of the address is turned into a folder name: each
word between hyphens gets a capital letter, and the folder sits in a sub-folder named after its first
letter. On /artists/bob-marley that's <root>/B/Bob-Marley. Names that
don't start with a letter go in <root>/0-9. Upper and lower case in the folder name
don't matter. |
{auto-gallery slug="bob-marley"} |
The same as above, but with the name given in the shortcode instead of taken from the address. |
This page-address mode is meant for a Custom module that shows on many pages, such as one module on every artist page that shows that artist's photos.
In a Custom module, set the module's Prepare Content option to Yes, or Joomla won't run content plugins on it and the shortcode shows as text.
Settings
| Setting | Default | What it does |
|---|---|---|
| Enable Lightbox | Yes | Opens a larger view when a visitor clicks an image, with arrows to move through the gallery. The lightbox script (GLightbox 3.3.1) ships with the plugin; nothing loads from a CDN. |
| Gallery Root Folder | {JPATH_ROOT}/images/galleries | The folder on the server that holds your gallery folders. {JPATH_ROOT} means your Joomla folder. |
| Gallery Root Web Address | /images/galleries | The web address of the same folder. |
| Allowed File Types | jpg,jpeg,png,gif,webp,avif | The file types a gallery shows. |
| Grid Column Classes | col-6 col-sm-4 col-md-3 col-lg-3 | Bootstrap column classes on each image: two per row on phones, three on small screens, four from tablets up. Use col-auto for fixed-size thumbnails. |
| Filename Prefix Filter | (empty) | Only show files whose name starts with this text, for example pi-. Separate several with commas. |
| Image Border Radius | (empty = 0.5rem) | Corner rounding of the thumbnails, for example 8px, 50% or 0. |
| Show Captions | Yes | Shows a caption in the lightbox. |
| Show Empty Message | Yes | Shows "No images found for …" when a folder is empty or missing. Set to No to show nothing. |
| Show Debug Path | No | Shows above each gallery which folder it reads. Handy while setting up; turn it off on a live site. |
⤢ Click to enlarge
images folder.Shortcode options
Any of these can be added to one shortcode, for example
{auto-gallery folder="team" lightbox="0" col_classes="col-6 col-md-4"}.
Values with spaces go in quotes.
| Option | Example | What it does |
|---|---|---|
folder | folder="events/picnic" | The folder to show, inside the gallery root. |
slug | slug="bob-marley" | Use this name instead of the page address (see above). |
lightbox | lightbox="0" | Lightbox on (1) or off (0) for this gallery. |
col_classes | col_classes="col-6 col-md-4" | Column classes for this gallery. |
prefix | prefix="pi-,spi-" | Only files starting with one of these. |
extensions | extensions="jpg" | Narrows the allowed file types for this gallery. It can't add types the settings don't allow. |
border_radius | border_radius="0" | Corner rounding. |
width, height | height="200px" | Image width and height inside each thumbnail (default 100%). |
thumb_min_w, thumb_max_w, thumb_min_h, thumb_max_h | thumb_max_w="150px" | Minimum and maximum thumbnail sizes. Pair with col_classes="col-auto" for fixed-size thumbnails. |
show_captions, show_empty_message, show_debug_path | show_empty_message="0" | The matching settings, for this gallery. |
once, instance | once="1" instance="profile" | Show this gallery only once per page, even when the shortcode is in several modules on it. Galleries with the same instance name count as one. |
Sizes accept CSS lengths such as 120px, 50%, 0.5rem or
calc(100% - 1rem). Anything else is ignored.
Images, order and captions
- Images are shown in file-name order, with numbers in natural order (
photo-2beforephoto-10). - The caption is the file name without the extension, with hyphens and underscores as spaces, in title case:
stage-at-dusk.jpgbecomes "Stage At Dusk". It is also the image's alt text. - The thumbnails are your original files, scaled by the browser. Upload web-sized images (for example 1200 px wide) rather than camera originals.
⤢ Click to enlarge
walden-pond.jpg.Pro Activation
The plugin's Pro Activation tab links the site to your cybersalt.com account so updates arrive through Joomla. Enter the account's email and save. The panel then shows Active, Membership expired (with a renewal link), No membership found or Activation failed, plus the site's installation ID. Saving again re-checks straight away; the site also re-checks once a day. Clearing the email deactivates the site. Galleries work the same whether or not the site is activated. See Pro extensions: linking your site.
⤢ Click to enlarge
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| The shortcode shows as text | The plugin is disabled, or it's in a Custom module with Prepare Content set to No. |
| "No images found" | Turn on Show Debug Path to see the folder being read. Check it's inside the gallery root, the Gallery Root Web Address points at the same folder, and the files are an allowed type. |
| Images show as broken | The Gallery Root Folder and Gallery Root Web Address point at different places. |
{JPATH_ROOT} in a shortcode doesn't work |
Its closing brace ends the shortcode early. The root folder comes from the settings only; use folder="…" for a sub-folder. |
| No updates show up | Check the Pro Activation tab says Active. If it does, save the tab once to re-check, then use Check for Updates. |
Getting help
Use the support form on cybersalt.com.
A gallery — click anywhere to closeClose ×
The Plugin tab — click anywhere to closeClose ×
The lightbox — click anywhere to closeClose ×
The Pro Activation tab — click anywhere to closeClose ×