code: @Override
      public int doStartTag() {
  
          ServletRequest req = pageContext.getRequest();
  
          // this will always be true if the page is called through OpenCms
          if (CmsFlexController.isCmsRequest(req)) {
  
              try {
                  CmsJspImageBean scaledImage = null;
                  try {
                      CmsFlexController controller = CmsFlexController.getController(req);
                      CmsObject cms = controller.getCmsObject();
                      String src = CmsLinkManager.getAbsoluteUri(m_src, controller.getCurrentRequest().getElementUri());
                      scaledImage = imageTagAction(cms, src, m_scaler, m_hiDpiVariantList);
                  } catch (CmsException e) {
                      // any issue accessing the VFS - just return SKIP_BODY
                      // otherwise template layout will get mixed up with nasty exception messages
                      if (LOG.isWarnEnabled()) {
                          LOG.warn(Messages.get().getBundle().key(Messages.ERR_IMAGE_TAG_VFS_ACCESS_1, m_src), e);
                      }
                  }
                  pageContext.getRequest().setAttribute(m_var, scaledImage);
              } catch (Exception ex) {
                  if (LOG.isErrorEnabled()) {
                      LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "scaleImage"), ex);
                  }
                  return SKIP_BODY;
              }
          }
          return EVAL_BODY_INCLUDE;
      }
docs: Handles the Start tag, checks some parameters, uses the CmsImageScaler to create a scaled
  version of the image (and hi-DPI variants if necessary), stores all information in a
  image bean and stores it as a request attribute (the name for this attribute is given
  with the tag attribute "var").
  
  @return EVAL_BODY_INCLUDE or SKIP_BODY in case of an unexpected Exception (please consult
  the OpenCms log file if that happens)