Groups (tags) for images

Gallery3x4 min readPage 19 of 22
On this page 13

Starting with version 3.0.17, Gallery3x supports grouping images with groups (tags). One image can have several groups at once, which lets you organise and filter images flexibly.

Key features

  • Several groups for one image
  • Global groups available in all galleries of the component
  • Quick filtering by group in the manager
  • Bulk assignment of groups to selected images
  • A convenient interface with visual “pills”

Creating groups

Groups are created on the fly when editing images. To create a new group:

  1. Open the context menu on an image (right click).
  2. Choose “Edit properties”.
  3. Start typing the group name in the “Group” field (for example, “Landscape”).
  4. ⚠️ Be sure to press Enter — the group turns into a “pill” with a cross.
  5. Repeat to add more groups.
  6. Click “Save”.

Without pressing Enter the group is not created! After Enter the text turns into a coloured “pill” — this means the group has been added.

Assigning groups to one image

Option 1: via image properties

  1. Right click on the image → “Edit properties”.
  2. Type the name in the “Group” field and press Enter.
  3. Add more groups (pressing Enter each time).
  4. Click “Save”.

Option 2: choosing existing groups

  1. Right click on the image → “Edit properties”.
  2. Click in the “Group” field — a drop-down list opens.
  3. Choose existing groups from the list (created earlier).
  4. Or type a new group and press Enter.
  5. Click “Save”.

Bulk assignment

You can assign groups to several images at once:

  1. Select several images (holding Ctrl or Shift).
  2. Right click → “Set group…”.
  3. In the window, choose or create groups (remember to press Enter).
  4. Click “Save”.
  5. The groups are added to the groups these images already have.

Filtering by group

The gallery toolbar has a group filter:

  1. Open the “Filter by group:” drop-down.
  2. Choose the group.
  3. The gallery shows only images with this group.
  4. To reset the filter, click “Reset”.

Removing groups

Removing a group from an image:

  1. Right click on the image → “Edit properties”.
  2. Click the cross (×) on the group's “pill”.
  3. Click “Save”.

Removing a group completely: groups disappear automatically when no image uses them any more.

Where groups are shown

  • In the manager: all groups of an image are shown under it, comma-separated.
  • In the database: groups are stored in the group field of the gallery3x_files table, separated by || (the MODX standard).

Usage examples

Example 1: organising by topic. Create the groups Nature, Architecture, People, Animals, assign them to the images and use the filter to find the right category quickly.

Example 2: multiple classification. Images can have several groups: Winter, Landscape, Sunset — so you can find them by different criteria.

Example 3: bulk work. Select 20 images from one event, assign them the group Conference 2025, and add an extra group Corporate party to some of them.

FAQ

Q: I type a group name but it is not saved. Why?
A: You forgot to press Enter after typing the name. The group must turn into a “pill” with a cross.

Q: Are groups created in one gallery visible in another?
A: Yes. Groups are global and available in all galleries of the component.

Q: Can a group be renamed?
A: No, but you can remove the old group from all images and create a new one with the right name.

Q: How many groups can one image have?
A: Any number.

Groups on the site

All snippets have the &group parameter: [[!Gallery3x? &group=`Interior`]], several groups — comma-separated. Videos, files and embeds have groups too; the group list is shared (with gallery3x.groups_per_user — each manager has their own).

Technical details

  • Storage format: groups are stored in the group field separated by || (for example Nature||Landscape||Winter).
  • UI component: the standard MODX SuperBoxSelect.
  • Processors: File/GetGroups, File/BulkSetGroup, File/Update.