Support for Captioned Images

I need to have captions for my images. But I guess xwiki doesn’t support it yet.
Is there any chance of having it supported in near future?
Or is there an easy workaround?? It would save much efforts in our content organization.

Thanks in advance…

Caption is supported in the XWiki Syntax, see (see “title” and “alt” parameters).

By caption I meant to display the text below/above/besides image.
title displays the string only on hover.
alt displays string when image can’t be loaded.

I would like to achieve something like this… Enhanced Image |

Ah yes sorry I misunderstood.

Indeed I see there’s an issue about this Loading...
However it now seems supported in the WYSIWYG editor (CKEditor), see Loading... and Loading...

Another solution is to use the {{box}} macro with a title (see

And another simple solution is to create a wiki macro, (it’s quite simple)

Hope it helps

FTR just tested and seems the WYSIWYG editor no longer allows captions on image by default. We must have lost the feature when we changed the image dialog. @mflorea, any idea?

Seems the reason is that we disabled the captioned image feature, see comment at Loading...

So indeed we need to put this back.

Right now your best solution is probably to create a wiki macro for that. If you don’t succeed let us know and we’ll help.

Another option is to use a jquery plugin such as which will add captions, taking the data from a data-caption attribute or from the alt text as a fallback.

Thanks for the input. I would try jQuery.
But wouldn’t it be possible to have Enhanced Image | plugin for xwiki ckeditor?
It seems much handy and easy.

As I mentioned, I think this is what we use already but if you check the link I gave you’ll see we disabled “captioned image” voluntarily becuase of some rendering issue: Loading...

On this issue I asked Marius for more details to see what it would take to put it back.

Just created Loading... if you wish to follow on the topic.

1 Like

Is there any way so that caption support will be available anytime soon? I am in much need of it.


Hi Vishal,

There are 2 ways to get this done soon:

Solution 3: you do as I suggested and use one of the numerous jquery libraries that exist. You said you would try it but didn’t report back about what you tried.

Thanks for your prompt reply. I actually tried with jQuery but got few errors.
As I am no coder, I couldn’t rectify them. May be I should have asked here for help. I will do it the next moment I get time.

Thank you once again

Bit late, but this jsx code does exactly same as CaptionJS (wrap the image with figure and figcaption with text from Alt):

require(['jquery'], function($) {
  $(document).ready(function($) {
  $('#xwikicontent img:not( .no-figure )').each(function() {
      if (!jQuery(this).parent().is('figure')) {
          jQuery(this).wrap($('<figure/>', {
              'class': 'image'
          var img_alt = $(this).attr('alt');
          if (img_alt) {

This works fine, yet we do have a problem with galleries. Any ideas?