How to organize and structure attachments (like images for a gallery). Possible plugins?

Hi! I’m currently figuring out if XWiki will fit my use case.
What I want to do: a general-purpose wiki describing a game. Including in-game content, developers and all the relevant stuff (from merch to concept art).

I’ve managed to deploy an instance locally on my local Linux system to try it out. Text editing and customizing works fine, but I’ve stumbled on attachments.

As far as I understand, attachments in XWiki are being stored on per-page basis.
What I would like: more like a booru system where images have tags assigned to them, so I can easily pull all the relevant images with one or two keywords with no need to remember what page exactly are they attached to.


  1. A concept artist has his own page in the wiki. I’d like to showcase his works throughout the text.
  2. At the same time: some of his works include specific characters. I’d like also to showcase them on the pages dedicated to those characters.
  3. Also I may want to feature images on more “generic” category-like pages, like “NPCs”, “Decorations”, “Items”, “Landscape” etc.
  4. Additionally, since graphic content is usually copyright-protected, I need to assign a license to every image (for example, some will be under CC, others under Fair Use). This is probably a must, without citing copyright clauses at least in some form it is impossible to understand which images can be used for what. (that, and the wiki will be insta-killed by the first DMCA request fired).
  5. Finally, not mandatory, but it would be a cool bonus to be able to store links to the source (for example, in an artist’s portfolio).

In booru imageboards, most of it can be solved by tags, prefixes to tags, etc. For example, “author:name” or "character:name’, with image easily retrieved and manipulated (sorted, displayed etc) by any tag combination. At the same time the place where they are stored matters little. If I want to retrieve a certain image, I need to remember what’s in it, not where I saved it several years ago. Was it under the author’s name, the upload date or the type of the image (photo, wallpaper, concept art, sketch, screenshot?).

As far as I know, since XWiki allows building “applications” on top of the data it stores, it is theoretically possible to build, say, a tag-based image gallery on top of a “normal wiki”. Which is why I turned my attention to it instead of DokuWiki or MediaWiki (which I’m more familiar with). The ability to pull “all characters”, or “all developers”, or “all pictures with chairs” is a very powerful one.

My question: Is it possible to do something like that? If yes, how would you propose to do that? Are there any specific plugins I should turn my attention to? How do you recommend organizing attachments in general (not necessarily images)?
I’m still very new to XWiki, but as far as I understand, images as attachments should be referenced when reused by referencing the page they are attached to, initially. This makes little sense for me, since I have no idea which image goes where to maintain good structure, but I need properly structured metadata to be able to find it (and so far I don’t know if it’s possible to add metadata, taglike or otherwise, to attachments in XWIki at all, like, say, in MediaWiki).

I can read the docs myself, so links are good, too, if this has already been covered. So far I can’t even properly formulate what should I search for.

You can attach one image to one page and put tags for that page (to represent the tags for your images).

Now, as you say the power of XWiki is the ability to easily create custom data structures and query them. You could easily create some ImageClass xclass with the metadata you want (including tags and anything else), and then through XWiki’s query system have queries to list them by criteria on their metadata.

You don’t really need to care about where the attachments are located, all that’s important is that there are XObjects for them somewhere.

I don’t know your level of understanding of XWiki but I would recommend checking:

You can just run queries to find your images and you don’t need to know the pages in which they’re stored.

I’d say yes. It’s probably doable just with just some scripting in wiki pages.

Hope it helps

1 Like

It does. I’m familiar with scripting in different C-based languages and know the basics of SQL, so as far as you explain it, it’s doable. How easily, now that can be determined through trial and error only, I suppose.

Another question while I’m here: is there a way to upload to XWiki, say, 20 or 50 images in a batch? I can do it one-by-one, but if there is an automated method, it would be more convenient.

Hello @Boreal ,
You can select several files on the attachment pane.

1 Like

or you can use the XWiki’s REST API.