code: protected void onImageThumbnail(WikiReference ref)
      {
          WikiParameters params = ref.getParameters();
          final WikiParameter oldstyle = params.getParameter("style");
          if (oldstyle != null) {
              // remove existing
              params.remove("style");
              params = params.addParameter("style", oldstyle.getValue() + ";" + "float: right; width:"
                  + getImageThumbwidth());
          } else {
              params = params.addParameter("style", "float: right; width:" + getImageThumbwidth());
          }
          params = params.remove("format");
          WikiReference newimgref = new WikiReference(ref.getLink(), ref.getLabel(), params);
          onImage(newimgref);
      }
docs: Special case when detected, that there are image thumbnail. Thus it's
  possible to insert something like XWiki "LightBox" macro. (Default
  implementation will set "width:200px")