docs: public static String imageTagAction(
          String src,
          CmsImageScaler scaler,
          Map<String, String> attributes,
          boolean partialTag,
          boolean noDim,
          ServletRequest req)
      throws CmsException {
  
          CmsFlexController controller = CmsFlexController.getController(req);
          CmsObject cms = controller.getCmsObject();
  
          // resolve possible relative URI
          src = CmsLinkManager.getAbsoluteUri(src, controller.getCurrentRequest().getElementUri());
          CmsUriSplitter splitSrc = new CmsUriSplitter(src);
  
          String scaleParam = null;
          if (splitSrc.getQuery() != null) {
              // check if the original URI already has parameters, this is true if original has been cropped
              String[] scaleStr = CmsRequestUtil.createParameterMap(splitSrc.getQuery()).get(CmsImageScaler.PARAM_SCALE);
              if (scaleStr != null) {
                  scaleParam = scaleStr[0];
              }
          }
  
          CmsResource imageRes = cms.readResource(splitSrc.getPrefix());
          CmsImageScaler original = new CmsImageScaler(cms, imageRes);
          scaler = getScaler(scaler, original, scaleParam);
  
          StringBuffer result = new StringBuffer(128);
          if (!partialTag) {
              // open tag if not a partial tag
              result.append("<img");
          }
  
          // append the image source
          result.append(" src=\"");
  
          String imageLink = cms.getSitePath(imageRes);
          if (scaler.isValid()) {
              // now append the scaler parameters
              imageLink += scaler.toRequestParam();
          }
          result.append(OpenCms.getLinkManager().substituteLink(cms, imageLink));
          result.append("\"");
  
          if (!noDim && scaler.isValid()) {
              // append image width and height
              result.append(" width=\"");
              result.append(scaler.getWidth());
              result.append("\"");
              result.append(" height=\"");
              result.append(scaler.getHeight());
              result.append("\"");
          }
  
          if (attributes != null) {
              // append the HTML attributes
              for (Map.Entry<String, String> entry : attributes.entrySet()) {
                  String attr = entry.getKey();
                  String value = entry.getValue();
                  result.append(" ");
                  result.append(attr);
                  result.append("=\"");
                  result.append(CmsEncoder.escapeXml(value));
                  result.append("\"");
              }
          }
  
          if (!partialTag) {
              // close tag if not a partial tag
              result.append(" />");
          }
          return result.toString();
      }