code: protected HtmlElement<?> getImageElement(Media media) {
      Image img = new Image();
  
      // Alternative text
      Asset asset = media.getAsset();
      String altText = null;
      if (asset != null) {
        altText = asset.getAltText();
      }
      if (StringUtils.isNotEmpty(altText)) {
        img.setAlt(altText);
      }
  
      return img;
    }
docs: Create an IMG element with alt text.
  @param media Media metadata
  @return IMG element with properties