Thumbnails are generated once — on upload in the manager (and on regeneration). The site serves ready files and the server does not process images on every view. Processing is done by the Glide library.
Thumbnail sizes
Sizes are set in the media source: Media → Media Sources → “Gallery3x Source” → Properties, the gallery3x_thumbnails parameter — a JSON array with one object per size. After installation it contains:
[
{"name": "small", "w": 120, "h": 90, "q": 90, "fit": "crop"},
{"name": "medium", "w": 360, "h": 270, "q": 100, "fit": "crop"},
{"name": "big", "w": 1200}
]
| Key | Description |
|---|---|
name | Required. Size name: the thumbnail folder and the [[+name_url]] placeholder ([[+small_url]], [[+big_url]]). |
w, h | Width and height, px. You can set just one — the other follows the proportions. |
fit | How to fit into w×h (see below). |
q | Quality 0–100 (for jpg, webp, avif). 90 by default. |
fm | Format of this size. If the gallery3x.format setting is set, it wins. |
| others | Any Glide parameters: sharp, blur, bg, flip, or, etc. |
fit values
| fit | Result |
|---|---|
contain | Default. Fit the whole image keeping proportions; the result may be smaller than w×h on one side. |
max | Like contain, but never enlarges an image smaller than the given size. |
fill | Fit the whole image and pad it to w×h with a background (colour — the bg parameter). |
stretch | Stretch exactly to w×h ignoring proportions. |
crop | Fill w×h and cut off the rest; the crop point — crop-top-left, crop-top, crop-center (default), crop-bottom-right, etc., or crop-25-75 (focal point in percent). |
Global processing settings
In the system settings (namespace gallery3x) — for all sizes at once:
gallery3x.format— format of all thumbnails (webpby default; empty — same as the original). The original is not converted.gallery3x.filters— effects separated by|:greyscale,sepia,blur=10,pixel=5,bri=10(brightness −100…100),con=-5(contrast),gam=1.5,sharp=15. Example:sepia|bri=10|con=-5.gallery3x.watermark_path,gallery3x.watermark_position,gallery3x.watermark_padding— a watermark on all thumbnails (the original stays without it).gallery3x.driver—imagickorgd.
Different sizes for different sections
Create another media source with its own gallery3x_thumbnails and bind it to templates with gallery3x.source_map, for example 12,14:5 — resources with templates 12 and 14 keep their images in source 5.
After changing the settings
Existing thumbnails do not change by themselves. Regenerate them: in the manager — right-click an image → “Regenerate thumbnails” (works for a selection too); for the whole site — the regenerate.php command-line script.
Glide’s intermediate files are kept in the
.cachefolder inside the source; it can be cleared.