code: protected void setImagePreview(String realPath, String imagePath) {
  
          if ((m_croppingParam == null) || !getFormValueAsString().contains(m_croppingParam.toString())) {
              m_croppingParam = CmsCroppingParamBean.parseImagePath(getFormValueAsString());
          }
          CmsCroppingParamBean restricted;
          int marginTop = 0;
          if (m_croppingParam.getScaleParam().isEmpty()) {
              imagePath += "?__scale=w:165,h:114,t:1,c:white,r:0";
          } else {
              restricted = m_croppingParam.getRestrictedSizeParam(114, 165);
              imagePath += "?" + restricted.toString();
              marginTop = (114 - restricted.getResultingHeight()) / 2;
          }
          Element image = DOM.createImg();
          image.setAttribute("src", imagePath);
          image.getStyle().setMarginTop(marginTop, Unit.PX);
          if (CmsClientStringUtil.checkIsPathOrLinkToSvg(realPath)) {
              image.getStyle().setWidth(100, Unit.PCT);
              image.getStyle().setHeight(100, Unit.PCT);
          }
          m_imagePreview.setInnerHTML("");
          m_imagePreview.appendChild(image);
      }
docs: Sets the image preview.<p>
  
  @param realPath the actual image path
  @param imagePath the image path